1. 02 Nov, 2015 1 commit
  2. 30 Oct, 2015 8 commits
    • Stavros Sachtouris's avatar
    • Stavros Sachtouris's avatar
    • Stavros Sachtouris's avatar
      Implement a stream download method, use it in cat · 9fa0fe6f
      Stavros Sachtouris authored
      "kamaki file cat" can now output data as they are being downloaded
      It is also safe to pipe it
      The new library method "stream_down" is implemented in
          "kamaki.clients.PithosClient" and it sequentially downloads
          parts of a remote object to a buffer, which is then written to
          the destination. The destination descriptor is prepared and
          provided by the caller (i.e., "kamaki file cat"). Each part of
          the object is downloaded asynchronously, though.
    • Stavros Sachtouris's avatar
    • Stavros Sachtouris's avatar
      Improve the blocking mechanism in kamaki clients · 80f20e72
      Stavros Sachtouris authored
      The "Waiter" class is now deprecated. A "wait" method is used
      instead. The new method is located at "kamaki.clients" and has
      this signature:
          poll method, poll method params,
          stop method,
          delay=1, timeout=100,
          caller callback method=None)
      The poll method is provided by the caller and is typically the
      "get_details" method of each API client.
      The "poll method params" is a list of parameters for the polling
      method, typically just the item id (i.e., server_id, port_id,
      The stop method returns a boolean, is called after each polling
      and decides whether the blocking should stop.
      The delay is the time between each call of the poll method
      The timeout is the total time after which the blocker stops
      The caller callback method is not a generator anymore, instead it
      is just a method that takes the results of the poll method as
      input and it is called at each iteration. It remains optional.
      Typically, the caller may use it to advance a progress bar.
      The CycladesComputeClient, CycladesNetworkClient and
      CycladesBlockStorageClient have been updated so that they make use
      of the new method, but they retain the ability to call the Waiter
      methods for two more versions, due to backwards compatibility
      The CLI has been adjusted to use the new mechanism.
    • Stavros Sachtouris's avatar
      Correct "create_server" docstring for "networks" · 552219f5
      Stavros Sachtouris authored
      The "create_server" method is located at "kamaki.clients.cyclades"
      as member of the "CycladesComputeClient" class.
      The docstring was incorrectly describing the effects passing None
      or [] to the "networks" argument.
    • Stavros Sachtouris's avatar
      Fix pep8 errors on affected files · 2efb0894
      Stavros Sachtouris authored
      Used flake8 to check for pep8 errors
    • Stavros Sachtouris's avatar
      Support uploading an object to different account · 71a2170b
      Stavros Sachtouris authored
      The term "different account" refers to a user account that is not
      the same as the one running the request.
      The most notable example is when user A uploads something to a
      directory owned by user B, provided user B has granted write
      permissions to user A.
  3. 08 Sep, 2015 2 commits
    • Stavros Sachtouris's avatar
      Use a new logging level for verbosity · dfe824dd
      Stavros Sachtouris authored
      The new logging level DEBUGV is set in "kamaki.clients" and it is
      used to log verbose information related to ReST communication.
      The CLI is changed accordingly.
    • Stavros Sachtouris's avatar
      Raise SSL error on IOError due to SSL cred. files · 3ef7651b
      Stavros Sachtouris authored
      The problem was noted in OS X: when an SSL credential file (e.g.,
      the certificates bundle) does not exist or is not provided, the
      ssl.wrap_socket method fails with an IOError, while in other
      systems it fails with an SSLError.
      In this commit, the IOError is examined and, if some conditions
      hold (errno==2, no SSL credential files or files do not exist), an
      SSLError is raised.
  4. 04 Jun, 2015 1 commit
  5. 04 May, 2015 2 commits
  6. 02 Mar, 2015 1 commit
    • Stavros Sachtouris's avatar
      Create subnets without gateway IPs · 4b37e7d8
      Stavros Sachtouris authored
      Fixes grnet/kamaki#101
      The "create_subnet" library method is modified to accept empty
      iterables as gateway values.
      The "kamaki subnet create" CLI command is enhanced with a new
      argument "--no-gateway".
  7. 05 Feb, 2015 1 commit
  8. 04 Feb, 2015 5 commits
  9. 07 Nov, 2014 2 commits
  10. 06 Nov, 2014 2 commits
    • Stavros Sachtouris's avatar
      Escape logged HTTP data before token replacement · 26115ba5
      Stavros Sachtouris authored
      Problem: when LOG_DATA is on and LOG_TOKEN is off, kamaki logs HTTP
      data, replaces the token (if it is included in the data) and then
      escapes them to prepare for safe logging. If the data is non-ascii,
      replacing raises a unicode error.
      Solution: escape data before replacing the token.
    • Stavros Sachtouris's avatar
      Handle SSL unicode bug with grace · 2a2faa29
      Stavros Sachtouris authored
      Fixes grnet/kamaki#67
      SSL module breaks when dealing with non-ascii filenames (known bug).
      Catch the Unicode error when it occurs and add an instructive error
      message for the kamaki library users.
      Check the file name for validity when it is set and inform the kamaki
      CLI users.
  11. 17 Oct, 2014 4 commits
    • Stavros Sachtouris's avatar
      Fix minor test, warning & pep8 issues (Python 2.6) · 6e381262
      Stavros Sachtouris authored
      A bug is fixed in the test of "add_subcmd" of "kamaki.cli.cmdtree".
      A warning on using the deprecated "message" name in ClientError has been
      dealt with.
      Pep8 issues concerning the modified files are fixed.
    • Stavros Sachtouris's avatar
      Rename "raise_ssl_errors" to "ignore_ssl" · 0f01bb76
      Stavros Sachtouris authored
      Refs grnet/kamaki#74
      The modified flag is located in HTTPSClientAuthConnection of
      The default flag value is reversed.
      Also, rename the method "patch_to_raise_ssl_errors" to "patsh_ignore_ssl".
      The boolean values passed to this method is also reversed.
      Update documentation accordingly.
    • Stavros Sachtouris's avatar
      Restore compatibility with Python 2.6 in HTTPS cls · 2e32d86f
      Stavros Sachtouris authored
      Fixes grnet/kamaki#73
      The problem is caused by the argument "source_address' when
      instantiating "httplib.HTTPSConnection" in "kamaki.clients.utils.https"
      This argument was added in Python 2.7, therefore a TypeError would
      ensue with Python 2.6
      This is fixed by catching the TypeError and retrying without the
      "source_address" argument.
    • Stavros Sachtouris's avatar
      Set default logger to astakosclient.AstakosClient · 59abec6b
      Stavros Sachtouris authored
      Fixes grnet/kamaki#58
      This bug fix refers to the LoggedAstakosClient wrapper.
      The class AstakosClient is not forced to use a default logger.
  12. 15 Oct, 2014 1 commit
  13. 02 Oct, 2014 1 commit
    • Stavros Sachtouris's avatar
      Escape characters in CLI output methods · 5852db11
      Stavros Sachtouris authored
      Closes grnet/kamaki#32
      Kamaki CLI commands use some generic output methods to handle outputs.
      Generic output methods that escape control characters:
      - in kamaki.cli.utils: print_items, print_dict, print_list
      - in kamaki.cli.cmds: error
      Generic output methods that don't escape control characters:
      - in kamaki.cli.cmds: writeln, write
      The methods that don't escape control characters are used when the
      standard methods are not sufficient. For example, in "kamaki.cli.pithos"
      the "PithosAccount.print_objects" method adds decorative escape characters
      (i.e., bold, alignment), but has to escape the parts object and container
      names. To achieve this, escaping is handled in the method, and the output
      is printed with the "write" and "writeln" methods mentioned earlier.
      An encoding issue with kamaki.cli.errors.CLIError and the Exceptions extending it,
      is fixed. It is now ensured that the error message will always be in unicode.
      Also, fix flake8 errors on files affected by the above changes
  14. 01 Oct, 2014 1 commit
  15. 26 Sep, 2014 1 commit
  16. 25 Sep, 2014 3 commits
    • Stavros Sachtouris's avatar
      Initialize kamaki clients with default certs path · 14ef92cb
      Stavros Sachtouris authored
      Refs #55
      If no CA certificates are set, kamaki clients will use
      CACERTS_DEFAULT_PATH from "kamaki.defaults".
      This commit concerns applications using "kamaki.clients", but does
      not affect the kamaki CLI.
    • Stavros Sachtouris's avatar
      Add ignore-ssl and ca-certs options to CLI · 96a0b656
      Stavros Sachtouris authored
      Refs #54
      Both options are set either in the config file or as runtime
      ignore-ssl option allows connections without checking SSL certificates.
      The ca-certs option provides a CA file for SSL authentication.
      Normally, if no cert files are provided or they are invalid, kamaki
      attempts to connect anyway, and an SSL Error ensues.
      If ignore-ssl is set to "on", kamaki connects to servers regardless of
      the existence or validity of a cert file and all SSL errors are ignored.
      To help package maintainers to provide the correct CA file for their platform,
      the default path is set in "kamaki/defaults.py" as CACERTS_DEFAULT_PATH
    • Stavros Sachtouris's avatar
      Patch objpool.http to support SSL Authentication · e70e95c2
      Stavros Sachtouris authored
      Refs #54
      The module objpool.http provides pooled connections without SSL
      A new connection class is implemented in kamaki.clients.utils.https
      The name of the class is HTTPSClientAuthConnection
      The PooledHTTPConnection is patched to provide HTTPSClientAuthConnection
      instances as https connections.
      Also, astakosclient module is patched to use the same https connection class.
  17. 15 Sep, 2014 1 commit
  18. 25 Aug, 2014 1 commit
  19. 29 Jul, 2014 2 commits