~junaidali/charms/trusty/plumgrid-gateway/oil_bug

« back to all changes in this revision

Viewing changes to hooks/pg_gw_utils.py

  • Committer: Hassaan Pasha
  • Date: 2015-08-10 16:45:08 UTC
  • Revision ID: hassaanp@plumgrid.com-20150810164508-7h25vzubijofikid
Updated unit tests for HA

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
    '''
136
136
    _exec_cmd(cmd=['rmmod', 'iovisor'], error_msg='Error Loading Iovisor Kernel Module')
137
137
 
 
138
 
138
139
def check_interface_type():
139
140
    '''
140
141
    Checks the interface. Support added for AWS deployments. There are 2
143
144
    log("Checking Interface Type")
144
145
    default_interface = "juju-br0"
145
146
    AWS_interface = "eth0"
146
 
    shell_output = subprocess.check_output(['brctl','show','juju-br0'])
147
 
    output = re.split(' |\n|\t',shell_output)
 
147
    shell_output = subprocess.check_output(['brctl', 'show', 'juju-br0'])
 
148
    output = re.split(' |\n|\t', shell_output)
148
149
    if output[10] == '':
149
150
        return AWS_interface
150
151
    else:
151
152
        return default_interface
152
153
 
 
154
 
153
155
def ensure_mtu():
154
156
    '''
155
157
    Ensures required MTU of the underlying networking of the node.