Skip to content

Commit

Permalink
Prevent prompt for user/password when running fab setup_all
Browse files Browse the repository at this point in the history
Change-Id: I7d8faa246f7752716f876fc330cd9a278823bbba
Closes-bug: 1573255
  • Loading branch information
srajag committed May 19, 2016
1 parent ac54dc3 commit 4158fce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions contrail_provisioning/common/base.py
Expand Up @@ -198,12 +198,12 @@ def setup_sriov_vfs(self):
intf_list = sriov_string.split(",")
for intf_details in intf_list:
info = intf_details.split(":")
#Keep this command consistent with provision.py in fabric utils
# Keep this command consistent with provision.py in fabric utils
str = 'echo %s > /sys/class/net/%s/device/sriov_numvfs; sleep 2; ifup -a' % (info[1], info[0])
# Do nothing if the entry already present in /etc/rc.local
if sudo('grep -w \'%s\' /etc/rc.local' % str,
quiet=True).succeeded:
continue
with settings(warn_only = True):
if local('grep -w \'%s\' /etc/rc.local' % str).succeeded:
continue

sed = 'sudo sed -i \'/^\s*exit/i ' + str + '\' /etc/rc.local'
with settings(warn_only = True):
Expand Down
2 changes: 1 addition & 1 deletion contrail_provisioning/common/interface_setup.py
Expand Up @@ -465,7 +465,7 @@ def _get_vf_index(self, dev):
return ''

def _cfg_append_spoof_vlan(self, dev, cfg):
'''Append a line to the config to turn off spoof check Also add VLAN 0
'''Append a line to the config to turn off spoof check Also add VLAN 0
to the given VF as ixgbe seems to require it.
'''
vfi = self._get_vf_index(dev)
Expand Down

0 comments on commit 4158fce

Please sign in to comment.