Skip to content

Commit

Permalink
Merge pull request Tendrl#544 from Tendrl/develop
Browse files Browse the repository at this point in the history
Merge develop onto master
  • Loading branch information
r0h4n authored Jul 18, 2017
2 parents 7e43428 + 4a56e1a commit 11a108b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions tendrl/node_agent/node_sync/disk_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def sync():

if "virtio" in disks[disk]["driver"]:
# Virtual disk
NS.tendrl.objects.VirtualDisk(**disks[disk]).save(ttl=_keep_alive_for)
NS.tendrl.objects.VirtualDisk(**disks[disk]).save(
ttl=_keep_alive_for
)
else:
# physical disk
NS.tendrl.objects.Disk(**disks[disk]).save(ttl=_keep_alive_for)
Expand Down Expand Up @@ -170,16 +172,16 @@ def get_disk_details():
disk.split(':')[1].lstrip().replace('"', "")
elif key.strip() == "Vendor":
devlist["vendor"] = \
disk.split(':')[1].lstrip().replace('"', "")
disk.split(':')[1].replace(" ", "").replace('"', "")
elif key.strip() == "Device":
devlist["device"] = \
disk.split(':')[1].lstrip().replace('"', "")
disk.split(':')[1].replace(" ", "").replace('"', "")
elif key.strip() == "Revision":
devlist["rmversion"] = \
disk.split(':')[1].lstrip().replace('"', "")
elif key.strip() == "Serial ID":
devlist["serial_no"] = \
disk.split(':')[1].lstrip().replace('"', "")
disk.split(':')[1].replace(" ", "").replace('"', "")
elif key.strip() == "Driver":
devlist["driver"] = \
disk.split(':')[1].lstrip().replace('"', "")
Expand Down
4 changes: 3 additions & 1 deletion tendrl/node_agent/node_sync/network_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def sync():
interfaces = get_node_network()
if len(interfaces) > 0:
for interface in interfaces:
NS.tendrl.objects.NodeNetwork(**interface).save(ttl=_keep_alive_for)
NS.tendrl.objects.NodeNetwork(**interface).save(
ttl=_keep_alive_for
)
if interface['ipv4']:
for ipv4 in interface['ipv4']:
index_key = "/indexes/ip/%s" % ipv4
Expand Down

0 comments on commit 11a108b

Please sign in to comment.