1. 07 Nov, 2014 3 commits
    • Stavros Sachtouris's avatar
      Write a set of short scripts using the kamaki lib · e3132145
      Stavros Sachtouris authored
      Fixes grnet/kamaki#49
      e3132145
    • Stavros Sachtouris's avatar
      Update general information and setup instructions · 28dd8a05
      Stavros Sachtouris authored
      Refs grnet/kamaki#49
      28dd8a05
    • Stavros Sachtouris's avatar
      Check server status before changing it · 19522a57
      Stavros Sachtouris authored
      Fixes grnet/kamaki#57
      
      This fix affects the CLI commands "server_start", "server_reboot"
      and "server_shutdown" which are specified in "kamaki.cli.cmds.cyclades".
      These are the operations that modify the status of a server.
      
      The problem was caused when the target status was the same as the current.
      In this case, the request for status modification would fail with a 400
      error code response. At this point, kamaki couldn't have adequate information
      to correctly evaluate the error.
      
      This problem is solved by checking the current status before attempting to
      modify it.  Also, the server ID is validated in advance, instead of waiting
      for a 400 server error.
      19522a57
  2. 06 Nov, 2014 4 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.
      26115ba5
    • 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.
      2a2faa29
    • Stavros Sachtouris's avatar
      Handle non-ascii characters in config files · 3fc52244
      Stavros Sachtouris authored
      Fixes grnet/kamaki#76
      
      * Support non-ascii characters for all values
      * Disallow non-ascii characters for all types of options
      * Escape control characters in option names and values
      3fc52244
    • Stavros Sachtouris's avatar
      Warn/raise error when config file is inaccessible · 342eb1b2
      Stavros Sachtouris authored
      Fixes grnet/kamaki#71
      
      Raise an error if the file is not readable or not existing, warn if
      it is not writable, add a description to the error message when
      kamaki attempts to write to a non-writable config file.
      342eb1b2
  3. 17 Oct, 2014 7 commits
  4. 16 Oct, 2014 1 commit
  5. 15 Oct, 2014 2 commits
  6. 13 Oct, 2014 1 commit
  7. 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
      5852db11
  8. 01 Oct, 2014 2 commits
  9. 26 Sep, 2014 2 commits
  10. 25 Sep, 2014 4 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.
      14ef92cb
    • Stavros Sachtouris's avatar
      99f47050
    • 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
      arguments.
      
      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
      96a0b656
    • 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
      Authentication.
      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.
      e70e95c2
  11. 23 Sep, 2014 1 commit
  12. 15 Sep, 2014 2 commits
  13. 25 Aug, 2014 2 commits
  14. 01 Aug, 2014 1 commit
  15. 30 Jul, 2014 1 commit
    • Stavros Sachtouris's avatar
      Report error in case of incorrectly encoded terms · 55226564
      Stavros Sachtouris authored
      Fixes #41
      
      This bug was located at the code that parses the command terms.
      If a term is invalid with respect to the current locale settings,
      an "Unknown error" was being raised.
      Kamaki is now reporting a descriptive error with a reference to
      the faulty term.
      55226564
  16. 29 Jul, 2014 6 commits