Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-318

Add ability to manipulate with vApp metadata in vCloud

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.3
    • Fix Version/s: 0.13.0
    • Component/s: Compute

      Description

      vCloud 5.1 RESTful api supports reading and updating metadata of vApps. You can save there key:value pairs and you can also specify type of the value. It is practical for example for saving/reading owner of given vApp. I have implemented two methods in vCloud driver, one for getting all metadata of given vApp and one for setting value for given vApp and key. It currently supports only string value type (we don't need typechecking there). I will attach the patch soon.

        Activity

        Hide
        msamia Michel Samia added a comment -

        Thanks for merging, your change is OK.

        Show
        msamia Michel Samia added a comment - Thanks for merging, your change is OK.
        Hide
        kami Tomaz Muraus added a comment -

        Sorry for the delay and thanks.

        I've merged your patch into trunk with a minor change - I changed the ex_set_metadata_entry method signature and made "node" argument first instead of the last one.

        I did this to match the ex_get_metadata method signature and to move argument which changes less often to the beginning.

        Show
        kami Tomaz Muraus added a comment - Sorry for the delay and thanks. I've merged your patch into trunk with a minor change - I changed the ex_set_metadata_entry method signature and made "node" argument first instead of the last one. I did this to match the ex_get_metadata method signature and to move argument which changes less often to the beginning.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1476056 from Tomaz Muraus
        [ https://svn.apache.org/r1476056 ]

        Add ex_set_metadata_entry and ex_get_metadata method to the VCloud driver.

        Contributed by Michel Samia, part of LIBCLOUD-318.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1476056 from Tomaz Muraus [ https://svn.apache.org/r1476056 ] Add ex_set_metadata_entry and ex_get_metadata method to the VCloud driver. Contributed by Michel Samia, part of LIBCLOUD-318 .
        Hide
        msamia Michel Samia added a comment -

        Thank you for making this clear explicitly. I intuitively percieved 1.5 and 5.1 as synonyms Looking forward to see my patch merged in trunk...

        Show
        msamia Michel Samia added a comment - Thank you for making this clear explicitly. I intuitively percieved 1.5 and 5.1 as synonyms Looking forward to see my patch merged in trunk...
        Hide
        sengork Sengor Kusturica added a comment -

        FYI - This patch should work with vCloud Director v1.5 as well as v5.1 as long as the 1.5 API version is used. So it's appropriate to include those methods within VCloud_1_5_NodeDriver as you've done in the patch, no need to move them out to VCloud_5_1_NodeDriver.

        Show
        sengork Sengor Kusturica added a comment - FYI - This patch should work with vCloud Director v1.5 as well as v5.1 as long as the 1.5 API version is used. So it's appropriate to include those methods within VCloud_1_5_NodeDriver as you've done in the patch, no need to move them out to VCloud_5_1_NodeDriver.
        Hide
        msamia Michel Samia added a comment - - edited

        Please test the patch with tox. For me ox worked well only with py2.6, although python 3.3 was in path. The test runner crashed on 3.1 and 3.3 with this message:

        py33 inst-nodeps: /home/nsbuild/libcloud/.tox/dist/apache-libcloud-0.12.0-dev.zip
        py33 runtests: commands[0]
        running test
        Traceback (most recent call last):
        File "setup.py", line 265, in <module>
        'Programming Language :: Python :: Implementation :: PyPy'])
        File "/home/nsbuild/local/lib/python3.3/distutils/core.py", line 148, in setup
        dist.run_commands()
        File "/home/nsbuild/local/lib/python3.3/distutils/dist.py", line 917, in run_commands
        self.run_command(cmd)
        File "/home/nsbuild/local/lib/python3.3/distutils/dist.py", line 936, in run_command
        cmd_obj.run()
        File "setup.py", line 88, in run
        status = self._run_tests()
        File "setup.py", line 143, in _run_tests
        tests = TestLoader().loadTestsFromNames(testfiles)
        File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 137, in loadTestsFromNames
        suites = [self.loadTestsFromName(name, module) for name in names]
        File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 137, in <listcomp>
        suites = [self.loadTestsFromName(name, module) for name in names]
        File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 105, in loadTestsFromName
        parent, obj = obj, getattr(obj, part)
        AttributeError: 'module' object has no attribute 'test_local'
        ERROR: InvocationError: '/home/nsbuild/libcloud/.tox/py33/bin/python setup.py test'

        Show
        msamia Michel Samia added a comment - - edited Please test the patch with tox. For me ox worked well only with py2.6, although python 3.3 was in path. The test runner crashed on 3.1 and 3.3 with this message: py33 inst-nodeps: /home/nsbuild/libcloud/.tox/dist/apache-libcloud-0.12.0-dev.zip py33 runtests: commands [0] running test Traceback (most recent call last): File "setup.py", line 265, in <module> 'Programming Language :: Python :: Implementation :: PyPy']) File "/home/nsbuild/local/lib/python3.3/distutils/core.py", line 148, in setup dist.run_commands() File "/home/nsbuild/local/lib/python3.3/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/home/nsbuild/local/lib/python3.3/distutils/dist.py", line 936, in run_command cmd_obj.run() File "setup.py", line 88, in run status = self._run_tests() File "setup.py", line 143, in _run_tests tests = TestLoader().loadTestsFromNames(testfiles) File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 137, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 137, in <listcomp> suites = [self.loadTestsFromName(name, module) for name in names] File "/home/nsbuild/local/lib/python3.3/unittest/loader.py", line 105, in loadTestsFromName parent, obj = obj, getattr(obj, part) AttributeError: 'module' object has no attribute 'test_local' ERROR: InvocationError: '/home/nsbuild/libcloud/.tox/py33/bin/python setup.py test'
        Hide
        msamia Michel Samia added a comment -

        The patch fixing this issue. Contains tests as well.

        Show
        msamia Michel Samia added a comment - The patch fixing this issue. Contains tests as well.

          People

          • Assignee:
            kami Tomaz Muraus
            Reporter:
            msamia Michel Samia
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development