summaryrefslogtreecommitdiffstats
path: root/deploy/post/execute.py
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-03-08 02:21:57 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-08 02:21:57 +0000
commit70fbd81292bd0a514e3a0add4a84bb6f425bc5e2 (patch)
treecadef2a2df3869c1f3a6dbd5e5769210fc258eca /deploy/post/execute.py
parentcea3fc95422cb550a156c365e046099e413e0563 (diff)
parent010d2c95261820add617047a030e4d06563a6613 (diff)
Merge "create external network"
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()