def test_list_policies_limit(self):
     # size (1000) limited list: qos-policy-list -P.
     cmd = policy.ListQoSPolicy(test_cli20.MyApp(sys.stdout), None)
     self._test_list_resources(self.ress,
                               cmd,
                               page_size=1000,
                               cmd_resources=self.cmd_ress)
 def test_list_policies(self):
     # qos-policy-list.
     cmd = policy.ListQoSPolicy(test_cli20.MyApp(sys.stdout), None)
     self._test_list_resources(self.ress,
                               cmd,
                               True,
                               cmd_resources=self.cmd_ress)
 def test_list_policies_sort(self):
     # sorted list: qos-policy-list --sort-key name --sort-key id
     # --sort-key asc --sort-key desc
     cmd = policy.ListQoSPolicy(test_cli20.MyApp(sys.stdout), None)
     self._test_list_resources(self.ress,
                               cmd,
                               sort_key=["name", "id"],
                               sort_dir=["asc", "desc"],
                               cmd_resources=self.cmd_ress)
 def test_list_policies_pagination(self):
     # qos-policy-list for pagination.
     cmd = policy.ListQoSPolicy(test_cli20.MyApp(sys.stdout), None)
     self._test_list_resources_with_pagination(self.ress,
                                               cmd,
                                               cmd_resources=self.cmd_ress)