|
@@ -26,12 +26,12 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
self.provider.security.key_pairs.create(name=kp.name)
|
|
self.provider.security.key_pairs.create(name=kp.name)
|
|
|
|
|
|
|
|
sit.check_crud(self, self.provider.security.key_pairs, KeyPair,
|
|
sit.check_crud(self, self.provider.security.key_pairs, KeyPair,
|
|
|
- "cb_crudkp", create_kp, cleanup_kp,
|
|
|
|
|
|
|
+ "cb-crudkp", create_kp, cleanup_kp,
|
|
|
extra_test_func=extra_tests)
|
|
extra_test_func=extra_tests)
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.key_pairs'])
|
|
@helpers.skipIfNoService(['security.key_pairs'])
|
|
|
def test_key_pair_properties(self):
|
|
def test_key_pair_properties(self):
|
|
|
- name = 'cb_kpprops-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-kpprops-{0}'.format(helpers.get_uuid())
|
|
|
kp = self.provider.security.key_pairs.create(name=name)
|
|
kp = self.provider.security.key_pairs.create(name=name)
|
|
|
with helpers.cleanup_action(lambda: kp.delete()):
|
|
with helpers.cleanup_action(lambda: kp.delete()):
|
|
|
self.assertIsNotNone(
|
|
self.assertIsNotNone(
|
|
@@ -44,7 +44,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_crud_vm_firewall(self):
|
|
def test_crud_vm_firewall(self):
|
|
|
- name = 'cb_crudfw-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-crudfw-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|
|
@@ -62,11 +62,11 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
net, _ = helpers.create_test_network(self.provider, name)
|
|
net, _ = helpers.create_test_network(self.provider, name)
|
|
|
|
|
|
|
|
sit.check_crud(self, self.provider.security.vm_firewalls,
|
|
sit.check_crud(self, self.provider.security.vm_firewalls,
|
|
|
- VMFirewall, "cb_crudfw", create_fw, cleanup_fw)
|
|
|
|
|
|
|
+ VMFirewall, "cb-crudfw", create_fw, cleanup_fw)
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_vm_firewall_properties(self):
|
|
def test_vm_firewall_properties(self):
|
|
|
- name = 'cb_propfw-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-propfw-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|
|
@@ -82,7 +82,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_crud_vm_firewall_rules(self):
|
|
def test_crud_vm_firewall_rules(self):
|
|
|
- name = 'cb_crudfw_rules-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-crudfw_rules-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|
|
@@ -104,13 +104,13 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
def cleanup_fw_rule(rule):
|
|
def cleanup_fw_rule(rule):
|
|
|
rule.delete()
|
|
rule.delete()
|
|
|
|
|
|
|
|
- sit.check_crud(self, fw.rules, VMFirewallRule, "cb_crudfwrule",
|
|
|
|
|
|
|
+ sit.check_crud(self, fw.rules, VMFirewallRule, "cb-crudfwrule",
|
|
|
create_fw_rule, cleanup_fw_rule,
|
|
create_fw_rule, cleanup_fw_rule,
|
|
|
skip_name_check=True)
|
|
skip_name_check=True)
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_vm_firewall_rule_properties(self):
|
|
def test_vm_firewall_rule_properties(self):
|
|
|
- name = 'cb_propfwrule-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-propfwrule-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|
|
@@ -133,7 +133,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_vm_firewall_rule_add_twice(self):
|
|
def test_vm_firewall_rule_add_twice(self):
|
|
|
- name = 'cb_fwruletwice-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-fwruletwice-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|
|
@@ -157,7 +157,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
|
|
|
|
|
|
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
@helpers.skipIfNoService(['security.vm_firewalls'])
|
|
|
def test_vm_firewall_group_rule(self):
|
|
def test_vm_firewall_group_rule(self):
|
|
|
- name = 'cb_fwrule-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
+ name = 'cb-fwrule-{0}'.format(helpers.get_uuid())
|
|
|
|
|
|
|
|
# Declare these variables and late binding will allow
|
|
# Declare these variables and late binding will allow
|
|
|
# the cleanup method access to the most current values
|
|
# the cleanup method access to the most current values
|