Example #1
0
 def test_update_firewall_policy(self):
     """firewall-policy-update myid --name newname."""
     resource = 'firewall_policy'
     cmd = firewallpolicy.UpdateFirewallPolicy(test_cli20.MyApp(sys.stdout),
                                               None)
     self._test_update_resource(resource, cmd, 'myid',
                                ['myid', '--name', 'newname'],
                                {'name': 'newname', })
Example #2
0
 def test_update_firewall_policy_with_rules(self):
     # firewall-policy-update myid --firewall-rules "rule1 rule2".
     resource = 'firewall_policy'
     cmd = firewallpolicy.UpdateFirewallPolicy(test_cli20.MyApp(sys.stdout),
                                               None)
     firewall_rules_arg = u'rule_id3 rule_id4'
     firewall_rules_res = ['rule_id3', 'rule_id4']
     self._test_update_resource(
         resource, cmd, 'myid',
         ['myid', '--firewall-rules', firewall_rules_arg], {
             'firewall_rules': firewall_rules_res,
         })
Example #3
0
 def test_update_firewall_policy_name_shared_audited(self):
     # firewall-policy-update myid --name newname2 --shared --audited
     resource = 'firewall_policy'
     cmd = firewallpolicy.UpdateFirewallPolicy(test_cli20.MyApp(sys.stdout),
                                               None)
     self._test_update_resource(resource, cmd, 'myid', [
         'myid', '--name', 'newname2', '--shared', 'True', '--audited',
         'True'
     ], {
         'name': 'newname2',
         'shared': 'True',
         'audited': 'True'
     })