1. 02 Nov, 2015 1 commit
  2. 30 Oct, 2015 13 commits
  3. 29 Oct, 2015 2 commits
  4. 12 Oct, 2015 1 commit
  5. 24 Sep, 2015 1 commit
  6. 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.
      dfe824dd
    • 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.
      3ef7651b
  7. 04 Jun, 2015 2 commits
  8. 04 May, 2015 3 commits
  9. 16 Mar, 2015 1 commit
  10. 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".
      4b37e7d8
  11. 27 Feb, 2015 1 commit
  12. 26 Feb, 2015 9 commits
    • Dimitris Aragiorgis's avatar
      rwb+ mode is not a valid mode for open · 22dedcbf
      Dimitris Aragiorgis authored
      
      
      Windows does not allow opening files with mode 'rwb+'. Linux
      does but still this is not a proper mode to use.
      
      We should open files with mode 'rb+' in case we resume download
      and the file already exists and with mode 'wb+' otherwise.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      22dedcbf
    • Dimitris Aragiorgis's avatar
      Fix makedirs() usage · 41e4d5b5
      Dimitris Aragiorgis authored
      
      
      In we run:
      
        os.makedirs("dir1")
        os.makedirs("dir1")
      
      we get OSError: [Errno 17] File exists: 'dir1'
      
      Contrary to that if we run:
      
        os.makedirs("dir1")
        os.makedirs("dir1/dir2")
      
      it succeeds.
      
      Therefore we must check if our target directory exists before
      running makedirs.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      41e4d5b5
    • Dimitris Aragiorgis's avatar
      scripts: Verify/Fix remote directory structure · 4b609746
      Dimitris Aragiorgis authored
      
      
      A combination of kamaki and Pithos UI usage can lead to a
      Pithos state that is inconsistent and does not match
      ordinary directory structures.
      
      Specifically, if we have a file under .\dir1\dir2\dir3 and
      we upload dir1 recursively from a windows machine, pithos
      objects will look like this:
      
          D dir1/
        10B dir1/dir2/dir3/file
          D dir1\dir2
          D dir1\dir2\dir3
      
      If we traverse the above file structure from Pithos UI two
      additional files will be created:
      
         0B dir1/dir2
         0B dir1/dir2/dir3
      
      The above is a buggy behavior.
      
      This patch introduces the 'kamaki scripts verifyfs' command.
      It fixes the above structure in the following manner:
      
       a) --fix-conflicts will prepare the directory structure
      to become consistent by renaming the conflicting objects via adding a
      special suffix to them (e.g "_orig_2015-01-02"). Conflicting objects are
      objects that already exist in Pithos as file objects but they should be
      directory objects instead.
      
       b) --fix-dir-names will rename all existing directory objects that
      contain backslashes in their names, replacing '\' with '/'.
      
       c) --fix-missing-dirs will create missing intermediate directory
      objects.
      
      The --yes option will bypass prompting the end user.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      4b609746
    • Dimitris Aragiorgis's avatar
      Introduce the 'scripts' command namespace · eb5f6929
      Dimitris Aragiorgis authored
      
      
      This will be used for commands that don't fit exactly in the existing
      namespaces (file, image, container, etc.).
      
      Here we create a new package 'kamaki.cli.contrib' containing a 'scripts'
      module. We activate the new namespace by default.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      eb5f6929
    • Dimitris Aragiorgis's avatar
      file: Fix download to handle '\' properly · 6a2e5e55
      Dimitris Aragiorgis authored
      
      
      With previous commit we fixed upload so that all local paths
      are translated to remote paths with '/' as separator.
      
      Here, during download, we translate remote paths to local ones using
      os.path.sep as separator and then we use the os.path library to
      create or manipulate them.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      6a2e5e55
    • Dimitris Aragiorgis's avatar
      file: Fix uploading from Windows · 5f833d2b
      Dimitris Aragiorgis authored
      
      
      Up until now, if a user uploads a directory recursively from
      a Windows machine, then the following file structure will be
      stored in pithos:
      
         D dir1/
       10B dir1/dir2/dir3/file
         D dir1\dir2/
         D dir1\dir2\dir3
      
      Downloading this structure from a Linux machine is impossible
      because the following directories are created locally:
      
        dir1
        dir1\dir2
        dir1\dir2\dir3
      
      This way the file cannot be stored under dir1/dir2/dir3 which
      does not exist.
      
      Fix this by storing all paths with '/' as a separator in Pithos,
      rather than '\'.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      5f833d2b
    • Dimitris Aragiorgis's avatar
      file: Prompt user before deleting a non empty dir · df9a6a57
      Dimitris Aragiorgis authored
      
      
      Up until now, during object deletion, we could remove an object even
      if other objects with its name as prefix existed (i.e. non empty
      directory objects).
      
      With this patch we add an extra warning and prompt the user
      before the actual deletion takes place.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      df9a6a57
    • Dimitris Aragiorgis's avatar
      file: Add proper message when creating remote dirs · fb8f0c17
      Dimitris Aragiorgis authored
      
      
      When uploading a directory recursively, intermediate directory
      objects are created on the server. Log these actions in stderr with
      a 'remote:' prefix so that they do not get misinterpreted as local
      actions (mkdir).
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      fb8f0c17
    • Dimitris Aragiorgis's avatar
      utils: Fix ask_user prompt · 289fb633
      Dimitris Aragiorgis authored
      
      
      In case no input is given and the user just presses enter,
      raw_input() will return an empty string ('') and thus, if we refer
      to the first character of the response, an IndexError will be
      raised.
      
      Fix this.
      Signed-off-by: default avatarDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
      289fb633
  13. 12 Feb, 2015 3 commits