summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorMichael Gugino <michael.gugino@walmart.com>2016-05-12 16:15:19 -0400
committerHuanxuan Ao <huanxuan.ao@easystack.cn>2016-08-05 16:25:33 +0800
commit0736336a71db9baf3e768e4560a619ae6a875fa4 (patch)
tree14ab3a9da676214b7139f18ec03d324f1786937e /functional
parent5f6257206e1df085d1432778cfbc4489b87bc256 (diff)
downloadpython-openstackclient-0736336a71db9baf3e768e4560a619ae6a875fa4.tar.gz
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 <agent> openstack network agent delete <agent> Change-Id: I83ede6f89c37e7bdc38d7e9e7bb9d80e94c8becc Implements: blueprint implement-network-agents Depends-On: I9755637f76787d5fac8ff295ae273b308fcb98d0 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
Diffstat (limited to 'functional')
-rw-r--r--functional/tests/network/v2/test_network_agent.py32
1 files changed, 32 insertions, 0 deletions
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)