Skip to content

Commit

Permalink
python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Smith committed Oct 17, 2019
1 parent 0db0c02 commit 1ae5c91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions applications/configpush/apicservice_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
try:
from apicservice_test_credentials import (LOGIN, PASSWORD, IPADDR)
except ImportError:
print(''')
print('''
Please create a file called apicservice_test_credentials.py with the following:
IPADDR = ''
LOGIN = ''
PASSWORD = ''
'''
''')
sys.exit(0)


Expand Down
16 changes: 8 additions & 8 deletions samples/switch-commands/aci-show-fex.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ def get_node_ids(self, node_id):

@staticmethod
def print_fex(fex_attr, chassis_attr, detail=False):
print('FEX:%s Description: FEX0%s state: %s' % (fex_attr['id'],)
print('FEX:%s Description: FEX0%s state: %s' % (fex_attr['id'],
fex_attr['id'],
fex_attr['operSt'])
print(' FEX version: %s [Switch version: %s]' % (fex_attr['ver'],)
fex_attr['swVer'])
fex_attr['operSt']))
print(' FEX version: %s [Switch version: %s]' % (fex_attr['ver'],
fex_attr['swVer']))

if detail:
print(' FEX Interim version:', fex_attr['intVer'])
print(' Switch Interim version:', fex_attr['swIntVer'])
print(' Extender Model: %s, Extender Serial: %s' % (fex_attr['model'],)
fex_attr['ser'])
print(' Extender Model: %s, Extender Serial: %s' % (fex_attr['model'],
fex_attr['ser']))
print(' Part No:', chassis_attr['partNum'])
if detail:
print(' Card Id: %s,' % fex_attr['swCId'])
Expand Down Expand Up @@ -260,9 +260,9 @@ def print_show_fex(self, node_id, fex_id, detailed=False):
print(' Fabric interface state:')
for interface in resp.json()['imdata']:
intf_attr = interface['satmFabP']['attributes']
print(' %15s - Interface %4s. State: %s' % (intf_attr['id'],)
print(' %15s - Interface %4s. State: %s' % (intf_attr['id'],
intf_attr['operSt'],
intf_attr['fsmSt'])
intf_attr['fsmSt']))
if detailed:
query_url = ('/api/mo/topology/pod-1/node-%s/sys/satm/fabp-[%s].json?query-target=subtree'
'&target-subtree-class=satmHostP' % (node_id, intf_attr['id']))
Expand Down

0 comments on commit 1ae5c91

Please sign in to comment.