Exemplo n.º 1
0
 def test_list_policyprofile_known_option_after_unknown(self):
     """List policyprofile: -- --tags a b --request-format xml."""
     resources = 'policy_profiles'
     cmd = policyprofile.ListPolicyProfile(test_cli20.MyApp(sys.stdout),
                                           None)
     contents = [{'name': 'myname', 'segment_type': 'vlan'}]
     self._test_list_resources(resources,
                               cmd,
                               tags=['a', 'b'],
                               response_contents=contents)
Exemplo n.º 2
0
 def test_list_policyprofile_detail(self):
     """List policyprofile: -D."""
     resources = 'policy_profiles'
     cmd = policyprofile.ListPolicyProfile(test_cli20.MyApp(sys.stdout),
                                           None)
     contents = [{'name': 'myname', 'segment_type': 'vlan'}]
     self._test_list_resources(resources,
                               cmd,
                               True,
                               response_contents=contents)
Exemplo n.º 3
0
 def test_list_policyprofile_fields(self):
     """List policyprofile: --fields a --fields b -- --fields c d."""
     resources = 'policy_profiles'
     cmd = policyprofile.ListPolicyProfile(test_cli20.MyApp(sys.stdout),
                                           None)
     contents = [{'name': 'myname', 'segment_type': 'vlan'}]
     self._test_list_resources(resources,
                               cmd,
                               fields_1=['a', 'b'],
                               fields_2=['c', 'd'],
                               response_contents=contents)