Commit 6b03559a authored by Greg Williams's avatar Greg Williams
Browse files

Removed need to have Ruby, Rake, Ceedling etc for a non-dev build.

Removed support for non-existent instanterase command until Admin API is release.
Removed deprecated blocking/non-blocking session config params from example utility.
Moved git submodule update to new make config task and updated README to note.
Various other README cleanup.
parent 6ac5602e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -98,16 +98,18 @@ makedirs:

all: default test system_tests test_internals run examples

clean: makedirs update_git_submodules
clean: makedirs
	rm -rf ./bin/*.a ./bin/*.so ./bin/kinetic-c-util $(DISCOVERY_UTIL_EXEC)
	rm -rf ./bin/**/*
	rm -f $(OUT_DIR)/*.o $(OUT_DIR)/*.a *.core *.log
	bundle exec rake clobber
	if rake --version > /dev/null 2>&1; then if bundle --version > /dev/null 2>&1; then bundle exec rake clobber; fi; fi
	cd ${SOCKET99} && make clean
	cd ${LIB_DIR}/threadpool && make clean
	cd ${LIB_DIR}/bus && make clean
	if [ -f ${JSONC}/Makefile ]; then cd ${JSONC} && make clean; fi;

config: makedirs update_git_submodules

update_git_submodules:
	git submodule update --init

@@ -415,7 +417,6 @@ run: $(UTIL_EXEC)
	@echo Running test utility: $(UTIL_EXEC)
	@echo --------------------------------------------------------------------------------
	@echo
	$(UTIL_EXEC) instanterase
	$(UTIL_EXEC) noop
	exec $(UTIL_EXEC) put get delete
	@echo
+6 −7
Original line number Diff line number Diff line
@@ -44,19 +44,18 @@ Getting Started

    > git clone --recursive https://github.com/seagate/kinetic-c.git
    > cd kinetic-c
    > bundle install # ensure you have all RubyGems at the proper versions

**Update to the latest version (previously cloned)**

    > git pull
    > make clean
    > make config # ensures all git submodules are up to date

**Build and install static library**

    > make
    > sudo make install

**Clean and uninstall old versions**
**Clean and uninstall any old versions**

    > make clean
    > sudo make uninstall
@@ -96,7 +95,7 @@ Options
Operations
----------

* `kinetic-c-util [--host|-h hostname|123.253.253.23] [noop] [put] [get] [delete] [instanterase]`
* `kinetic-c-util [--host|-h hostname|123.253.253.23] [noop] [put] [get] [delete]`
    * `./bin/kinetic-c-util noop`
        * Execute a NoOp (ping) operation to verify the Kinetic Device is ready
    * `./bin/kinetic-c-util put`
@@ -105,16 +104,16 @@ Operations
        * Execute a Get operation to retrieve a key/value entry
    * `./bin/kinetic-c-util delete`
        * Execute a Delete operation to destroy a key/value entry
    * `./bin/kinetic-c-util instanterase` *INCOMPLETE*
        * Execute an InstantSecureErase operation to erase ALL content from the device

Kinetic C Client I/O Examples
=============================

* [`blocking_put_get`](src/examples/blocking_put_get.c) - Blocking put w/get.
* [`blocking_put_delete`](src/examples/blocking_put_delete.c) - Blocking put w/delete.
* [`put_nonblocking`](src/examples/put_nonblocking.c) - Single thread, single connection, nonblocking put operation.
* [`get_nonblocking`](src/examples/get_nonblocking.c) - Single thread, single connection, nonblocking get operation.
* [`get_key_range`](src/examples/get_key_range.c) - Query a range of keys from a device.
* [`write_file_blocking`](src/examples/write_file_blocking.c) - Single thread, single connection, blocking operation.
* [`write_file_blocking_threads`](src/examples/write_file_blocking_threads.c) - Multiple threads, single connection, blocking operations.
* [`write_file_nonblocking`](src/examples/write_file_nonblocking.c) - Single thread, single connection, multiple non-blocking operations
* [`write_file_blocking_threads`](src/examples/write_file_blocking_threads.c) - Multiple threads, single connection, multiple non-blocking operations.
* [`get_key_range`](src/examples/get_key_range.c) - Query a range of keys from a device.
+9 −20
Original line number Diff line number Diff line
@@ -107,15 +107,7 @@ KineticStatus ExecuteOperation(
{
    KineticStatus status = KINETIC_STATUS_INVALID;

    if (strcmp("instanterase", operation) == 0) {
        status = KineticClient_InstantSecureErase(session);
        if (status == 0) {
            printf("\nInstantSecureErase executed successfully."
                   " The device has been erased!\n\n");
        }
    }

    else if (strcmp("noop", operation) == 0) {
    if (strcmp("noop", operation) == 0) {
        status = KineticClient_NoOp(session);
        if (status == KINETIC_STATUS_SUCCESS) {
            printf("\nNoOp operation completed successfully."
@@ -139,14 +131,6 @@ KineticStatus ExecuteOperation(
        }
    }

    else if (strcmp("delete", operation) == 0) {
        status = KineticClient_Delete(session, entry, NULL);
        if (status == 0) {
            printf("\nDelete executed successfully."
                   " The entry has been destroyed!\n\n");
        }
    }

    else if (strcmp("getnext", operation) == 0) {
        status = KineticClient_GetNext(session, entry, NULL);
        if (status == 0) {
@@ -163,6 +147,14 @@ KineticStatus ExecuteOperation(
        }
    }

    else if (strcmp("delete", operation) == 0) {
        status = KineticClient_Delete(session, entry, NULL);
        if (status == 0) {
            printf("\nDelete executed successfully."
                   " The entry has been destroyed!\n\n");
        }
    }

    else {
        printf("\nSpecified operation '%s' is invalid!\n\n", operation);
        return -1;
@@ -239,7 +231,6 @@ int ParseOptions(
    struct {
        char host[HOST_NAME_MAX];
        int port;
        int nonBlocking;
        int useTls;
        int64_t clusterVersion;
        int64_t identity;
@@ -263,8 +254,6 @@ int ParseOptions(

    // Create configuration for long format options
    struct option long_options[] = {
        {"non-blocking", no_argument,       &cfg.nonBlocking, true},
        {"blocking",     no_argument,       &cfg.nonBlocking, false},
        {"tls",          no_argument,       &cfg.port,        KINETIC_TLS_PORT},
        {"host",         required_argument, 0,                'h'},
        {0,              0,                 0,                0},