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

Function get_rule_log_for_vm

scripts/vm/network/security_group.py:771–784  ·  view source on GitHub ↗
(vmName)

Source from the content-addressed store, hash-verified

769
770
771def get_rule_log_for_vm(vmName):
772 vm_name = vmName
773 logfilename = logpath + vm_name + ".log"
774 if not os.path.exists(logfilename):
775 return ''
776
777 lines = (line.rstrip() for line in open(logfilename))
778
779 [_vmName,_vmID,_vmIP,_domID,_signature,_seqno] = ['_', '-1', '_', '-1', '_', '-1']
780 for line in lines:
781 [_vmName,_vmID,_vmIP,_domID,_signature,_seqno] = line.split(',')
782 break
783
784 return ','.join([_vmName, _vmID, _vmIP, _domID, _signature, _seqno])
785
786
787def check_domid_changed(vmName):

Callers 1

get_rule_logs_for_vmsFunction · 0.85

Calls 2

existsMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected