MCPcopy Create free account
hub / github.com/apache/cloudstack / rewrite_rule_log_for_vm

Function rewrite_rule_log_for_vm

scripts/vm/network/security_group.py:757–768  ·  view source on GitHub ↗
(vm_name, new_domid)

Source from the content-addressed store, hash-verified

755
756
757def rewrite_rule_log_for_vm(vm_name, new_domid):
758 logfilename = logpath + vm_name + ".log"
759 if not os.path.exists(logfilename):
760 return
761 lines = (line.rstrip() for line in open(logfilename))
762
763 [_vmName,_vmID,_vmIP,_domID,_signature,_seqno] = ['_', '-1', '_', '-1', '_', '-1']
764 for line in lines:
765 [_vmName,_vmID,_vmIP,_domID,_signature,_seqno] = line.split(',')
766 break
767
768 write_rule_log_for_vm(_vmName, _vmID, '0.0.0.0', new_domid, _signature, '-1')
769
770
771def get_rule_log_for_vm(vmName):

Callers 1

Calls 2

write_rule_log_for_vmFunction · 0.85
existsMethod · 0.65

Tested by

no test coverage detected