VMClient
- class DIRAC.WorkloadManagementSystem.Client.VMClient.VMClient(*args, **kwargs)
Bases:
DIRAC.Core.Base.Client.Client
- __init__(*args, **kwargs)
C’tor.
- Parameters
kwargs – just stored as an attribute and passed when creating the RPCClient
- property call
To be removed once we’re sure self.call has been removed
- Type
Deprecated
- checkVmWebOperation(self, operation, **kwargs)
return true if rpc has OPERATOR
Automatically created for the service function
export_checkVmWebOperation()
- Parameters
operation – operation
- declareInstanceHalting(self, uniqueID, load, **kwargs)
Insert the heart beat info from a halting instance The VM has the uniqueID, which is the Cloud manager VM id Declares “Halted” the instance and the image It returns S_ERROR if the status is not OK
Automatically created for the service function
export_declareInstanceHalting()
- Parameters
uniqueID – uniqueID
load – load
- declareInstanceRunning(self, uniqueID, privateIP, **kwargs)
Declares an instance Running and sets its associated info (uniqueID, publicIP, privateIP) Returns S_ERROR if: - instanceName does not have a “Submitted” entry - uniqueID is not unique
Automatically created for the service function
export_declareInstanceRunning()
- Parameters
uniqueID – uniqueID
privateIP – privateIP
- declareInstanceSubmitted(self, uniqueID, **kwargs)
After submission of the instance the Director should declare the new Status
Automatically created for the service function
export_declareInstanceSubmitted()
- Parameters
uniqueID – uniqueID
- declareInstancesStopping(self, instanceIdList, **kwargs)
Declares “Stopping” the instance because the Delete button of Browse Instances The instanceID is the VMDIRAC VM id When next instanceID heat beat with stopping status on the DB the VM will stop the job agent and terminates properly It returns S_ERROR if the status is not OK
Automatically created for the service function
export_declareInstancesStopping()
- Parameters
instanceIdList – instanceIdList
- executeRPC(*parms, **kws)
This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.
- Parameters
rpc – if an RPC client is passed, use that one
timeout – we can change the timeout on a per call bases. Default is self.timeout
url – We can specify which url to use
- getAllInfoForUniqueID(self, uniqueID, **kwargs)
Get all the info for a UniqueID
Automatically created for the service function
export_getAllInfoForUniqueID()
- Parameters
uniqueID – uniqueID
- getCEInstances(self, siteList, ceList, vo, **kwargs)
Automatically created for the service function
export_getCEInstances()
- Parameters
siteList – siteList
ceList – ceList
vo – vo
- getClientKWArgs()
Returns a copy of the connection arguments
- getHistoryForInstanceID(self, instanceId, **kwargs)
Retrieve the contents of the DB
Automatically created for the service function
export_getHistoryForInstanceID()
- Parameters
instanceId – instanceId
- getHistoryValues(self, averageBucket, selDict, fields2Get, timespan, **kwargs)
Retrieve the contents of the DB
Automatically created for the service function
export_getHistoryValues()
- Parameters
averageBucket – averageBucket
selDict – selDict
fields2Get – fields2Get
timespan – timespan
- getInstanceCounters(self, groupField, selDict, **kwargs)
Retrieve the contents of the DB
Automatically created for the service function
export_getInstanceCounters()
- Parameters
groupField – groupField
selDict – selDict
- getInstancesByStatus(self, status, **kwargs)
Get dictionary of Image Names with InstanceIDs in given status
Automatically created for the service function
export_getInstancesByStatus()
- Parameters
status – status
- getInstancesContent(self, selDict, sortDict, start, limit, **kwargs)
Retrieve the contents of the DB
Automatically created for the service function
export_getInstancesContent()
- Parameters
selDict – selDict
sortDict – sortDict
start – start
limit – limit
- getPilotOutput(self, pilotReference, **kwargs)
Automatically created for the service function
export_getPilotOutput()
- Parameters
pilotReference – pilotReference
- getRunningInstancesBEPHistory(self, timespan, bucketSize, **kwargs)
Retrieve number of running instances in each bucket by End-Point History
Automatically created for the service function
export_getRunningInstancesBEPHistory()
- Parameters
timespan – timespan
bucketSize – bucketSize
- getRunningInstancesByImageHistory(self, timespan, bucketSize, **kwargs)
Retrieve number of running instances in each bucket by Running Pod History
Automatically created for the service function
export_getRunningInstancesByImageHistory()
- Parameters
timespan – timespan
bucketSize – bucketSize
- getRunningInstancesByRunningPodHistory(self, timespan, bucketSize, **kwargs)
Retrieve number of running instances in each bucket by Running Pod History
Automatically created for the service function
export_getRunningInstancesByRunningPodHistory()
- Parameters
timespan – timespan
bucketSize – bucketSize
- getRunningInstancesHistory(self, timespan, bucketSize, **kwargs)
Retrieve number of running instances in each bucket
Automatically created for the service function
export_getRunningInstancesHistory()
- Parameters
timespan – timespan
bucketSize – bucketSize
- getServer()
Getter for the server url. Useful ?
- getUniqueID(self, instanceID, **kwargs)
return cloud manager uniqueID from VMDIRAC instanceID
Automatically created for the service function
export_getUniqueID()
- Parameters
instanceID – instanceID
- getUniqueIDByName(self, instanceName, **kwargs)
return cloud manager uniqueID from VMDIRAC name
Automatically created for the service function
export_getUniqueIDByName()
- Parameters
instanceName – instanceName
- httpsClient
alias of
DIRAC.Core.Tornado.Client.TornadoClient.TornadoClient
- insertInstance(self, uniqueID, imageName, instanceName, endpoint, runningPodName, **kwargs)
Check Status of a given image Will insert a new Instance in the DB
Automatically created for the service function
export_insertInstance()
- Parameters
uniqueID – uniqueID
imageName – imageName
instanceName – instanceName
endpoint – endpoint
runningPodName – runningPodName
- instanceIDHeartBeat(self, uniqueID, load, jobs, transferredFiles, transferredBytes, uptime, **kwargs)
Insert the heart beat info from a running instance It checks the status of the instance and the corresponding image Declares “Running” the instance and the image It returns S_ERROR if the status is not OK
Automatically created for the service function
export_instanceIDHeartBeat()
- Parameters
uniqueID – uniqueID
load – load
jobs – jobs
transferredFiles – transferredFiles
transferredBytes – transferredBytes
uptime – uptime
- setInstanceUniqueID(self, instanceID, uniqueID, **kwargs)
Check Status of a given image Will insert a new Instance in the DB
Automatically created for the service function
export_setInstanceUniqueID()
- Parameters
instanceID – instanceID
uniqueID – uniqueID
- setServer(url)
Set the server URL used by default
- Parameters
url – url of the service
- stopInstance(self, site, endpoint, nodeID, **kwargs)
Automatically created for the service function
export_stopInstance()
- Parameters
site – site
endpoint – endpoint
nodeID – nodeID