summaryrefslogtreecommitdiffstats
path: root/deploy/post/execute.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-07 10:43:56 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-07 13:59:10 +0800
commit010d2c95261820add617047a030e4d06563a6613 (patch)
tree9e0df51f9458b9794c88a444ea1ba515aa42a8ca /deploy/post/execute.py
parent7c3c3d2a629f5bf5373d21780963a143d45e6067 (diff)
create external network
Change-Id: I6621fed21832f3e4653c2d236bb29de421b5b573 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'deploy/post/execute.py')
-rw-r--r--deploy/post/execute.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/deploy/post/execute.py b/deploy/post/execute.py
index 8758b401..3f05d005 100644
--- a/deploy/post/execute.py
+++ b/deploy/post/execute.py
@@ -9,9 +9,25 @@
import neutron
+def _config_admin_external_network():
+ name = 'admin_external'
+ body = {
+ 'network': {
+ 'name': name,
+ 'admin_state_up': True,
+ 'shared': True,
+ 'provider:network_type': 'flat',
+ 'provider:physical_network': 'physnet1',
+ 'router:external': True
+ }
+ }
+
+ return name, body
+
+
def main():
neutron.Neutron().list_networks()
-
+ neutron.Neutron().create_network(*(_config_admin_external_network()))
if __name__ == '__main__':
main()