def vm_monitoring(name, call=None):
 if (call != 'action'):
  raise SaltCloudSystemExit('The vm_monitoring action must be called with -a or --action.')
 (server, user, password) = _get_xml_rpc()
 auth = ':'.join([user, password])
 vm_id = int(get_vm_id(kwargs={'name': name}))
 response = server.one.vm.monitoring(auth, vm_id)
 if (response[0] is False):
  log.error("There was an error retrieving the specified VM's monitoring information.")
  return {}
 else:
  info = {}
  for vm_ in _get_xml(response[1]):
   info[vm_.find('ID').text] = _xml_to_dict(vm_)
  return info

def vm_monitoring ( name , call = None ) : if ( call != 'action' ) : raise SaltCloudSystemExit ( 'The vm_monitoring action must be called with -a or --action.' ) ( server , user , password ) = _get_xml_rpc ( ) auth = ':' . join ( [ user , password ] ) vm_id = int ( get_vm_id ( kwargs = { 'name' : name } ) ) response = server . one . vm . monitoring ( auth , vm_id ) if ( response [ 0 ] is False ) : log . error ( "There was an error retrieving the specified VM's monitoring information." ) return { } else : info = { } for vm_ in _get_xml ( response [ 1 ] ) : info [ vm_ . find ( 'ID' ) . text ] = _xml_to_dict ( vm_ ) return info
returns the monitoring records for a given virtual machine .