1. 30 Oct, 2015 2 commits
    • Stavros Sachtouris's avatar
      ac7de5ed
    • 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:
      wait(
          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,
      volume_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
      policies.
      
      The CLI has been adjusted to use the new mechanism.
      80f20e72
  2. 04 Feb, 2015 2 commits
  3. 06 Nov, 2014 1 commit
  4. 17 Oct, 2014 1 commit
  5. 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
  6. 16 Jun, 2014 1 commit
  7. 21 May, 2014 10 commits
  8. 01 Apr, 2014 1 commit
  9. 31 Mar, 2014 1 commit
  10. 27 Feb, 2014 2 commits
  11. 26 Feb, 2014 2 commits
  12. 25 Feb, 2014 1 commit
  13. 24 Feb, 2014 1 commit
  14. 11 Feb, 2014 1 commit
  15. 13 Dec, 2013 2 commits
  16. 12 Dec, 2013 1 commit
  17. 11 Dec, 2013 1 commit
  18. 10 Dec, 2013 2 commits
  19. 09 Dec, 2013 2 commits
  20. 29 Nov, 2013 2 commits
  21. 26 Nov, 2013 1 commit
  22. 19 Nov, 2013 1 commit
  23. 15 Nov, 2013 1 commit