summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorHuanxuan Ao <huanxuan.ao@easystack.cn>2016-08-10 15:26:45 +0800
committerHuanxuan Ao <huanxuan.ao@easystack.cn>2016-08-10 15:39:44 +0800
commit722be75f9cffec7242d893cac20d40c570af32d6 (patch)
tree8ce2fb64845c642ef6bc73a84cf23d6c9f3616c1 /functional
parent0b91368164acc596bf97fe4073083e26892f5b1a (diff)
downloadpython-openstackclient-722be75f9cffec7242d893cac20d40c570af32d6.tar.gz
Implement "network agent set" command
Add "network agent set" command in network v2 to set network agent properties. Also add the unit test, doc, functional test and release note. Change-Id: Iebaee4c60f8c6b43f538c1b82a38b93178b9ce53 Implements: bp implement-network-agents Co-Authored-By: Michael Gugino <michael.gugino@walmart.com>
Diffstat (limited to 'functional')
-rw-r--r--functional/tests/network/v2/test_network_agent.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/functional/tests/network/v2/test_network_agent.py b/functional/tests/network/v2/test_network_agent.py
index e01ead42..f574c50c 100644
--- a/functional/tests/network/v2/test_network_agent.py
+++ b/functional/tests/network/v2/test_network_agent.py
@@ -30,3 +30,12 @@ class NetworkAgentTests(test.TestCase):
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)
+
+ def test_network_agent_set(self):
+ opts = self.get_opts(['admin_state_up'])
+ self.openstack('network agent set --disable ' + self.IDs[0])
+ raw_output = self.openstack('network agent show ' + self.IDs[0] + opts)
+ self.assertEqual("DOWN\n", raw_output)
+ self.openstack('network agent set --enable ' + self.IDs[0])
+ raw_output = self.openstack('network agent show ' + self.IDs[0] + opts)
+ self.assertEqual("UP\n", raw_output)