From 0736336a71db9baf3e768e4560a619ae6a875fa4 Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Thu, 12 May 2016 16:15:19 -0400 Subject: Implement network agents functionality python-neutronclient implements the following command set: agent-list, agent-show, agent-delete These commands display and modify various network agents and their information. python-openstacksdk has supported the api calls for these commands, but python-openstackclient does not implement these commands. This commit adds support for the following commands: openstack network agent list openstack network agent show openstack network agent delete Change-Id: I83ede6f89c37e7bdc38d7e9e7bb9d80e94c8becc Implements: blueprint implement-network-agents Depends-On: I9755637f76787d5fac8ff295ae273b308fcb98d0 Co-Authored-By: Huanxuan Ao --- functional/tests/network/v2/test_network_agent.py | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 functional/tests/network/v2/test_network_agent.py (limited to 'functional') diff --git a/functional/tests/network/v2/test_network_agent.py b/functional/tests/network/v2/test_network_agent.py new file mode 100644 index 00000000..e01ead42 --- /dev/null +++ b/functional/tests/network/v2/test_network_agent.py @@ -0,0 +1,32 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from functional.common import test + + +class NetworkAgentTests(test.TestCase): + """Functional tests for network agent. """ + IDs = None + HEADERS = ['ID'] + FIELDS = ['id'] + + @classmethod + def test_network_agent_list(cls): + opts = cls.get_opts(cls.HEADERS) + raw_output = cls.openstack('network agent list' + opts) + # get the list of network agent IDs. + cls.IDs = raw_output.split('\n') + + def test_network_agent_show(self): + opts = self.get_opts(self.FIELDS) + raw_output = self.openstack('network agent show ' + self.IDs[0] + opts) + self.assertEqual(self.IDs[0] + "\n", raw_output) -- cgit v1.2.1