~lazypower/charms/trusty/nexentaedge-swift-gw/metadata-typo

« back to all changes in this revision

Viewing changes to hooks/configurationSteps/neadmRCConfig.py

  • Committer: anton.skriptsov at nexenta
  • Date: 2016-01-14 15:37:28 UTC
  • Revision ID: anton.skriptsov@nexenta.com-20160114153728-prghpi416mgiz9qb
fix lint errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#/usr/bin/env python
2
 
 
3
 
import os
4
 
import sys
5
1
import traceback
6
2
import subprocess
7
3
 
19
15
        print('[{}]'.format(self.__class__.__name__))
20
16
        print("\nnode_private_ip is: {}".format(node_private_ip))
21
17
 
22
 
        #change blank ip to mgmt node's private ip address
 
18
        # change blank ip to mgmt node's private ip address
23
19
        substitution_str = 's/API_URL=.*/API_URL=http:\/\/{}:8080/g'.format(
24
20
            node_private_ip)
25
21
        try:
26
 
            output = subprocess.check_output(
27
 
                ['sed', '-i', '-e', substitution_str,
28
 
                 Settings.NEADMRC_FILE_PATH],
29
 
                stderr=subprocess.STDOUT)
 
22
            subprocess.check_output(['sed', '-i', '-e', substitution_str,
 
23
                                    Settings.NEADMRC_FILE_PATH],
 
24
                                    stderr=subprocess.STDOUT)
30
25
 
31
26
        except Exception as ex:
32
27
            raise Exception('in {0}\nMessage:{1}\nTrace: {2}'.format(