Пример #1
0
 def test_0006(self):
     """Disable extension"""
     system = System(session=self.vca.vcloud_session, verify=self.vca.verify, log=self.vca.log)
     extension = system.get_extension(config['vcloud']['ext_name'])
     assert extension is not None
     name = extension.attrib['name']
     assert name == config['vcloud']['ext_name']
     result = system.enable_extension(name,
                                      extension.attrib['href'],
                                      enabled=False)
     extension = system.get_extension(config['vcloud']['ext_name'])
     assert extension is not None
     name = extension.attrib['name']
     assert name == config['vcloud']['ext_name']
     enabled = '****'
     for node in extension.findall('.//{http://www.vmware.com/vcloud/extension/v1.5}Enabled'):
         enabled = node.text
     assert enabled == 'false'
Пример #2
0
          username=username,
          service_type='standalone',
          version=version,
          verify=verify,
          log=log)

result = vca.login(password=password, org=org, org_url=org_url)
print_vca(vca)

system = System(session=vca.vcloud_session, verify=verify, log=log)

extension = system.get_extension(extension_name)
if extension == None:
    print('extension %s not found' % extension_name)
else:
    print(extension.attrib['name'])
    print(extension.attrib['href'])

result = system.enable_extension(extension_name,
                                 extension.attrib['href'],
                                 enabled=False)

result = system.unregister_extension(extension_name, extension.attrib['href'])

extension = system.get_extension(extension_name)
if extension == None:
    print('extension %s not found' % extension_name)
else:
    print(extension.attrib['name'])
    print(extension.attrib['href'])