summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorzhouya <zhou.ya@zte.com.cn>2017-10-12 18:55:50 +0800
committerzhouya <zhou.ya@zte.com.cn>2017-10-13 10:01:32 +0800
commit07ca3da85fdde4638a81d3be4563a01e35af5e77 (patch)
treeac4fc95082ba3dd7bf0fdad1c69721e6cb7daaed /deploy
parent164ffc1780a6ffd2634533849f67ed640fb0745b (diff)
remove unused null value of assigned network
change 'map' reserved keyword of python to regular variable Change-Id: I077eca363c095d0596fcd06bbad2e442050cb264 Signed-off-by: zhouya <zhou.ya@zte.com.cn>
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/get_conf.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/deploy/get_conf.py b/deploy/get_conf.py
index 4d112589..97d2feba 100755
--- a/deploy/get_conf.py
+++ b/deploy/get_conf.py
@@ -46,9 +46,9 @@ def network(network=None):
if net_plane == "TENANT":
net_plane = "physnet1"
network.pop('name')
- map = {}
- map[net_plane] = network
- return map
+ network_map = {}
+ network_map[net_plane] = network
+ return network_map
@decorator_mk('interfaces')
@@ -58,8 +58,8 @@ def interface(interface=None):
net_name = "physnet1"
interface_name = interface.get('interface', '')
map2 = {}
- map = {'ip': '', 'name': net_name}
- map2[interface_name] = [map]
+ interface_map = {'name': net_name}
+ map2[interface_name] = [interface_map]
return map2
@@ -67,25 +67,25 @@ def interface(interface=None):
def role(host=None):
hostname = host.get('name', '')
role = host.get('roles', '')
- map = {}
- map[hostname] = role
- return map
+ role_map = {}
+ role_map[hostname] = role
+ return role_map
@decorator_mk('hosts')
def host(host=None):
hostip = host.get('ip', [])
passwd = host.get('password', [])
- map = {}
- map = {'ip': hostip, 'passwd': passwd}
- return map
+ host_map = {}
+ host_map = {'ip': hostip, 'passwd': passwd}
+ return host_map
@decorator_mk('hosts')
def mac_address(host=None):
mac_addresses = host.get('mac_addresses', [])
- map = {host['name']: mac_addresses}
- return map
+ mac_addr_map = {host['name']: mac_addresses}
+ return mac_addr_map
def network_config_parse(network_data):