Workload¶
Submodules¶
cbc_sdk.workload.nsx_remediation module¶
NSX Remediation for Workloads
-
class
NSXRemediationJob
(cb, running_job_ids)¶ Bases:
object
An object that runs and monitors an NSX Remediation operation.
Creates a new NSXRemediationJob object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- running_job_ids (list[str]) – The list of running job IDs.
-
RUNNING_STATUSES
= ['UNASSIGNED', 'SCHEDULED', 'RUNNING', 'RUNNING_UNDELIVERED']¶
-
VALID_TAGS
= ['CB-NSX-Quarantine', 'CB-NSX-Isolate', 'CB-NSX-Custom']¶
-
async_await_result
()¶ Sets up a Future which can be used to wait asynchronously for all running jobs to be completed.
- Required Permissions:
- appliances.registration(READ)
Returns: A future representing the job and its results. Return type: Future
-
await_result
()¶ Waits for all running jobs to be completed and returns the final status.
- Required Permissions:
- appliances.registration(READ)
Returns: The final status, mapping individual job IDs to status value dicts. Return type: dict
-
classmethod
start_request
(cb, device_ids, tag, set_tag=True)¶ Starts an NSX Remediation request and returns the job object.
- Required Permissions:
- appliances.nsx.remediation(EXECUTE)
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- device_ids (int|list) – The device ID(s) to run the remediation request on.
- tag (str) – The NSX tag to apply to specified devices. Valid values are “CB-NSX-Quarantine”, “CB-NSX-Isolate”, and “CB-NSX-Custom”.
- set_tag (bool) – True to toggle the specified tag on, False to toggle it off. Default True.
Returns: The object representing all running jobs.
Return type: Raises: ApiError
– If the parameters to start the request are incorrect.ServerError
– If the request could not be successfully started.
-
status
¶ Returns the current status.
Returns: The current status, mapping individual job IDs to status value dicts. Return type: dict
cbc_sdk.workload.sensor_lifecycle module¶
Sensor Lifecycle Management for Workloads
-
class
SensorKit
(cb, initial_data=None)¶ Bases:
cbc_sdk.base.UnrefreshableModel
Represents the information about a sensor, including installation file URLs.
Parameters: - sensor_type – The type of information this sensor is for.
- sensor_url – The URL for downloading the sensor installation package.
- sensor_config_url – The URL for downloading the sensor configuration information.
- error_code – Code for any error that occurred while getting the sensor information.
- message – Message for any error that occurred while getting the sensor information.
Initialize the SensorKit object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- initial_data (dict) – Initial data used to populate the sensor kit data.
-
COMPUTE_RESOURCE_MAP
= {'CENTOS': 'RHEL', 'ORACLE': 'RHEL', 'SLES': 'SUSE'}¶
-
VALID_ARCHITECTURES
= ['32', '64', 'OTHER']¶
-
VALID_DEVICE_TYPES
= ['WINDOWS', 'LINUX', 'MAC']¶
-
VALID_TYPES
= ['WINDOWS', 'MAC', 'RHEL', 'UBUNTU', 'SUSE', 'AMAZON_LINUX']¶
-
error_code
= None¶
-
classmethod
from_type
(cb, device_type, architecture, sensor_type, version)¶ Helper method used to create a temporary SensorKit object from its four components.
This method CANNOT be used to create an object that will be persisted to the server.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- device_type (str) – Device type to be used. Valid values are “WINDOWS”, “LINUX”, and “MAC”.
- architecture (str) – Architecture to be used. Valid values are “32”, “64”, and “OTHER”.
- sensor_type (str) – Sensor type to be used. Valid values are “WINDOWS”, “MAC”, “RHEL”, “UBUNTU”, “SUSE”, and “AMAZON_LINUX”.
- version (str) – Sensor version number to be used.
Returns: A SensorType object with those specified values.
Return type: SensorType
Raises: ApiError
– If an invalid value was used for one of the three limited values.
-
classmethod
get_config_template
(cb)¶ Retrieve the sample config.ini file with the properties populated from the server.
Parameters: cb (BaseAPI) – Reference to API object used to communicate with the server. Returns: Text of the sample configuration file. Return type: str
-
message
= None¶
-
sensor_config_url
= None¶
-
sensor_type
= {}¶
-
sensor_url
= None¶
-
class
SensorKitQuery
(doc_class, cb)¶ Bases:
cbc_sdk.base.BaseQuery
,cbc_sdk.base.CriteriaBuilderSupportMixin
,cbc_sdk.base.IterableQueryMixin
,cbc_sdk.base.AsyncQueryMixin
Query class used to read in SensorKit objects.
Initialize the SensorKitQuery.
Parameters: - doc_class (class) – The model class that will be returned by this query.
- cb (BaseAPI) – Reference to API object used to communicate with the server.
-
add_sensor_kit_type
(skit=None, **kwargs)¶ Add a sensor kit type to the request.
Parameters: - skit (SensorKit) – The sensor kit type to be added to the request.
- **kwargs (dict) – If skit is None, the keyword arguments ‘device_type’, ‘architecture’, ‘sensor_type’, and ‘version’ are used to create the sensor kit type to be added.
Returns: Reference to this object.
Return type:
-
config_params
(params)¶ Sets the configuration parameters for the sensor kit query request.
Parameters: params (str) – The text of a config.ini file with a list of sensor properties to configure on installation. Returns: Reference to this object. Return type: SensorKitQuery
-
expires
(expiration_date_time)¶ Sets the expiration date and time for the sensor kit query request.
Parameters: expiration_date_time (str) – The time at which the sensor download link will expire, expressed as ISO 8601 UTC. Returns: Reference to this object. Return type: SensorKitQuery
cbc_sdk.workload.vm_workloads_search module¶
Model and Query Classes for VM Workloads Search API
-
class
AWSComputeResource
(cb, model_unique_id, initial_data=None)¶ Bases:
cbc_sdk.workload.vm_workloads_search.BaseComputeResource
Models an AWS compute resource.
Initialize the AWSComputeResource object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- model_unique_id (str) – ID of the alert represented.
- initial_data (dict) – Initial data used to populate the alert.
-
classmethod
bulk_install
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of ComputeResource objects used to specify compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
classmethod
bulk_install_by_id
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources, specified by ID.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of dicts, each of which contains the keys ‘vcenter_uuid’ and ‘compute_resource_id’, specifying the compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
install_sensor
(sensor_version, config_file=None)¶ Install a sensor on this compute resource.
Parameters: - sensor_version (str) – The version number of the sensor to be used.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
class
AWSComputeResourceQuery
(doc_class, cb)¶ Bases:
cbc_sdk.workload.vm_workloads_search.BaseComputeResourceQuery
Represents a query that is used to locate AWSComputeResource objects.
Initialize the ComputeResourceQuery.
Parameters: - doc_class (class) – The model class that will be returned by this query.
- cb (BaseAPI) – Reference to API object used to communicate with the server.
-
VALID_INSTALLATION_STATUS
= ('SUCCESS', 'ERROR', 'PENDING', 'NOT_INSTALLED')¶
-
exclude_auto_scaling_group_name
(auto_scaling_group_name)¶ Excludes the specified auto scaling group name from appearing in the search results.
Parameters: auto_scaling_group_name (list) – List of string auto scaling group names. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_availability_zone
(availability_zone)¶ Excludes the specified availability zone from appearing in the search results.
Parameters: availability_zone (list) – List of string availability zones. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_cloud_provider_account_id
(cloud_provider_account_id)¶ Excludes the specified cloud provider account ID from appearing in the search results.
Parameters: cloud_provider_account_id (list) – List of string cloud provider account IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_cloud_provider_resource_id
(cloud_provider_resource_id)¶ Excludes the specified cloud provider resource ID from appearing in the search results.
Parameters: cloud_provider_resource_id (list) – List of string cloud provider resource IDs. Returns: This instance. Return type: AWSComputeResourceQuery
Excludes the specified cloud provider tags from appearing in the search results.
Parameters: cloud_provider_tags (list) – List of string cloud provider tags. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_id
(id_value)¶ Excludes the specified compute resource ID from appearing in the search results.
Parameters: id_value (list) – List of string compute resource IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_installation_status
(installation_status)¶ Excludes the specified installation status from appearing in the search results.
Parameters: installation_status (list) – List of string installation statuses. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_name
(name)¶ Excludes the specified compute resource name from appearing in the search results.
Parameters: name (list) – List of string compute resource names. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_platform
(platform)¶ Excludes the specified platform from appearing in the search results.
Parameters: platform (list) – List of string platforms. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_platform_details
(platform_details)¶ Excludes the specified platform details from appearing in the search results.
Parameters: platform_details (list) – List of string platform details. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_region
(region)¶ Excludes the specified region from appearing in the search results.
Parameters: region (list) – List of string regions. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_subnet_id
(subnet_id)¶ Excludes the specified subnet ID from appearing in the search results.
Parameters: subnet_id (list) – List of string subnet IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
exclude_virtual_private_cloud_id
(virtual_private_cloud_id)¶ Excludes the specified virtual private cloud ID from appearing in the search results.
Parameters: virtual_private_cloud_id (list) – List of string virtual private cloud IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_auto_scaling_group_name
(auto_scaling_group_name)¶ Restricts the search that this query is performed on to the specified auto scaling group name.
Parameters: auto_scaling_group_name (list) – List of string auto scaling group names. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_availability_zone
(availability_zone)¶ Restricts the search that this query is performed on to the specified availability zone.
Parameters: availability_zone (list) – List of string availability zones. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_cloud_provider_account_id
(cloud_provider_account_id)¶ Restricts the search that this query is performed on to the specified cloud provider account ID.
Parameters: cloud_provider_account_id (list) – List of string cloud provider account IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_cloud_provider_resource_id
(cloud_provider_resource_id)¶ Restricts the search that this query is performed on to the specified cloud provider resource ID.
Parameters: cloud_provider_resource_id (list) – List of string cloud provider resource IDs. Returns: This instance. Return type: AWSComputeResourceQuery
Restricts the search that this query is performed on to the specified cloud provider tags.
Parameters: cloud_provider_tags (list) – List of string cloud provider tags. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_id
(id_value)¶ Restricts the search that this query is performed on to the specified compute resource ID.
Parameters: id_value (list) – List of string compute resource IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_installation_status
(installation_status)¶ Restricts the search that this query is performed on to the specified installation status.
Parameters: installation_status (list) – List of string installation statuses. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_name
(name)¶ Restricts the search that this query is performed on to the specified compute resource name.
Parameters: name (list) – List of string compute resource names. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_platform
(platform)¶ Restricts the search that this query is performed on to the specified platform.
Parameters: platform (list) – List of string platforms. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_platform_details
(platform_details)¶ Restricts the search that this query is performed on to the specified platform details.
Parameters: platform_details (list) – List of string platform details. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_region
(region)¶ Restricts the search that this query is performed on to the specified region.
Parameters: region (list) – List of string regions. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_subnet_id
(subnet_id)¶ Restricts the search that this query is performed on to the specified subnet ID.
Parameters: subnet_id (list) – List of string subnet IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
set_virtual_private_cloud_id
(virtual_private_cloud_id)¶ Restricts the search that this query is performed on to the specified virtual private cloud ID.
Parameters: virtual_private_cloud_id (list) – List of string virtual private cloud IDs. Returns: This instance. Return type: AWSComputeResourceQuery
-
summarize
(summary_fields)¶ Get compute resource summaries on required fields of the resources with the specified criteria.
Example
>>> from cbc_sdk import CBCloudAPI >>> from cbc_sdk.workload import AWSComputeResource >>> cbc = CBCloudAPI() >>> query = cbc.select(AWSComputeResource) >>> summary = query.summarize(['availability_zone', 'region', 'virtual_private_cloud_id'])
- Required Permissions:
- public.cloud.inventory(READ) or _API.Public.Cloud:Public.cloud.inventory:READ
Parameters: summary_fields (list[str]) – The fields to be summarized. Returns: A mapping of field names to the number of resources with that field. Return type: map[str, int]
-
class
BaseComputeResource
(cb, model_unique_id, initial_data=None)¶ Bases:
cbc_sdk.base.NewBaseModel
Internal BaseComputeResource model
Initialize the BaseComputeResource object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- model_unique_id (str) – ID of the compute resource represented.
- initial_data (dict) – Initial data used to populate the resource object.
-
classmethod
bulk_install
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of ComputeResource objects used to specify compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
classmethod
bulk_install_by_id
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources, specified by ID.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of dicts, each of which contains the keys ‘vcenter_uuid’ and ‘compute_resource_id’, specifying the compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
install_sensor
(sensor_version, config_file=None)¶ Install a sensor on this compute resource.
Parameters: - sensor_version (str) – The version number of the sensor to be used.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: NotImplementedError
– Always, for BaseComputeResource.
-
primary_key
= 'id'¶
-
urlobject
= '/lcm/view/v2/orgs/{0}/compute_resources'¶
-
urlobject_single
= '/lcm/view/v2/orgs/{0}/compute_resources/{1}?deployment_type={2}'¶
-
class
BaseComputeResourceQuery
(doc_class, cb)¶ Bases:
cbc_sdk.base.BaseQuery
,cbc_sdk.base.QueryBuilderSupportMixin
,cbc_sdk.base.CriteriaBuilderSupportMixin
,cbc_sdk.base.IterableQueryMixin
,cbc_sdk.base.AsyncQueryMixin
Base class for compute resource queries, not intended for direct use.
Initialize the BaseComputeResourceQuery.
Parameters: - doc_class (class) – The model class that will be returned by this query.
- cb (BaseAPI) – Reference to API object used to communicate with the server.
-
DEFAULT_FACET_ROWS
= 20¶
-
VALID_DEPLOYMENT_TYPE
= ('WORKLOAD', 'AWS')¶
-
VALID_DIRECTIONS
= ('ASC', 'DESC')¶
-
VALID_DOWNLOAD_FORMATS
= ('JSON', 'CSV')¶
-
download
(download_format=None)¶ Downloads all compute resources matching the specific criteria.
Example
>>> from cbc_sdk import CBCloudAPI >>> from cbc_sdk.workload import VCenterComputeResource >>> cbc = CBCloudAPI() >>> query = cbc.select(VCenterComputeResource).set_os_type(["UBUNTU"]).set_eligibility(["ELIGIBLE"]) >>> query.set_installation_status(["ERROR"]) >>> job = query.download("CSV") >>> job.await_completion() >>> print(job.get_output_as_string())
- Required Permissions:
- public.cloud.inventory(READ) or _API.Public.Cloud:Public.cloud.inventory:READ, jobs.status(READ)
Parameters: download_format (str) – The download format to be used. Valid values are “JSON” (the default) and “CSV”. Returns: Asynchronous job which will supply the results of the download when they’re complete. Return type: Job Raises: ApiError
– If the format specified was not valid, or if the server did not properly return the job.
-
facet
(fields, rows=None)¶ Facets all compute resources matching the specified criteria and returns the facet results.
Example
>>> from cbc_sdk import CBCloudAPI >>> from cbc_sdk.workload import AWSComputeResource >>> cbc = CBCloudAPI() >>> query = cbc.select(AWSComputeResource) >>> facets = query.facet(['platform', 'virtual_private_cloud_id'])
- Required Permissions:
- public.cloud.inventory(READ) or _API.Public.Cloud:Public.cloud.inventory:READ
Parameters: - fields (list[str]) – List of the fields to be faceted on.
- rows (int) – Number of the top entries to return. Default is 20.
Returns: The facet data.
Return type: list[ComputeResourceFacet]
-
sort_by
(key, direction='ASC')¶ Sets the sorting behavior on a query’s results.
Example
>>> cb.select(ComputeResource).sort_by("name")
Parameters: - key (str) – The key in the schema to sort by.
- direction (str) – The sort order.
Returns: This instance.
Return type:
-
class
ComputeResourceFacet
(cb, model_unique_id, initial_data=None)¶ Bases:
cbc_sdk.base.UnrefreshableModel
Facet data returned by the facet() method of the query.
Initialize the ComputeResourceFacet object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- model_unique_id (str) – ID of the facet represented.
- initial_data (dict) – Initial data used to populate the facet.
-
class
ComputeResourceFacetValue
(cb, model_unique_id, initial_data=None)¶ Bases:
cbc_sdk.base.UnrefreshableModel
Represents a single facet value inside a ComputeResourceFacet.
Initialize the ComputeResourceFacetValue object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- model_unique_id (str) – ID of the facet value represented.
- initial_data (dict) – Initial data used to populate the facet value.
-
values
¶ Returns the values for this particular facet.
Returns: The values of this facet. Return type: list[ComputeResourceFacet.ComputeResourceFacetValue]
-
class
VCenterComputeResource
(cb, model_unique_id, initial_data=None)¶ Bases:
cbc_sdk.workload.vm_workloads_search.BaseComputeResource
Models a vCenter compute resource.
Initialize the VCenterComputeResource object.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- model_unique_id (str) – ID of the alert represented.
- initial_data (dict) – Initial data used to populate the alert.
-
classmethod
bulk_install
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of ComputeResource objects used to specify compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
-
classmethod
bulk_install_by_id
(cb, compute_resources, sensor_kit_types, config_file=None)¶ Install a sensor on a list of compute resources, specified by ID.
Parameters: - cb (BaseAPI) – Reference to API object used to communicate with the server.
- compute_resources (list) – A list of dicts, each of which contains the keys ‘vcenter_uuid’ and ‘compute_resource_id’, specifying the compute resources to install sensors on.
- sensor_kit_types (list) – A list of SensorKit objects used to specify sensor types to choose from in installation.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
-
install_sensor
(sensor_version, config_file=None)¶ Install a sensor on this compute resource.
Parameters: - sensor_version (str) – The version number of the sensor to be used.
- config_file (str) – The text of a config.ini file with a list of sensor properties to configure on installation.
Returns: A dict with two members, ‘type’ and ‘code’, indicating the status of the installation.
Return type: dict
Raises: ApiError
– If the compute node is not eligible or is of an invalid type.
-
class
VCenterComputeResourceQuery
(doc_class, cb)¶ Bases:
cbc_sdk.workload.vm_workloads_search.BaseComputeResourceQuery
Represents a query that is used to locate ComputeResource objects.
Initialize the ComputeResourceQuery.
Parameters: - doc_class (class) – The model class that will be returned by this query.
- cb (BaseAPI) – Reference to API object used to communicate with the server.
-
VALID_ELIGIBILITY
= ('ELIGIBLE', 'NOT_ELIGIBLE', 'UNSUPPORTED')¶
-
VALID_INSTALLATION_STATUS
= ('SUCCESS', 'ERROR', 'PENDING', 'NOT_INSTALLED')¶
-
VALID_OS_ARCHITECTURE
= ('32', '64')¶
-
VALID_OS_TYPE
= ('WINDOWS', 'RHEL', 'UBUNTU', 'SUSE', 'SLES', 'CENTOS', 'OTHER', 'AMAZON_LINUX', 'ORACLE')¶
-
exclude_appliance_uuid
(appliance_uuid)¶ Excludes the specified appliance UUID from appearing in the search results.
Parameters: appliance_uuid (list) – List of string appliance uuids. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_cluster_name
(cluster_name)¶ Excludes the specified cluster name from appearing in the search results.
Parameters: cluster_name (list) – List of string cluster names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_datacenter_name
(datacenter_name)¶ Excludes the specified datacenter name from appearing in the search results.
Parameters: datacenter_name (list) – List of string datacenter names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_device_guid
(device_guid)¶ Excludes the specified device GUID from appearing in the search results.
Parameters: device_guid (list) – List of string device GUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_eligibility
(eligibility)¶ Excludes the specified eligibility from appearing in the search results.
Parameters: eligibility (list) – List of string eligibilities. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_eligibility_code
(eligibility_code)¶ Excludes the specified eligibility code from appearing in the search results.
Parameters: eligibility_code (list) – List of string eligibility codes. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_esx_host_name
(esx_host_name)¶ Excludes the specified ESX host name from appearing in the search results.
Parameters: esx_host_name (list) – List of string ESX host names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_esx_host_uuid
(esx_host_uuid)¶ Excludes the specified ESX host UUID from appearing in the search results.
Parameters: esx_host_uuid (list) – List of string ESX host UUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_host_name
(host_name)¶ Excludes the specified host name from appearing in the search results.
Parameters: host_name (list) – List of string host names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_installation_status
(installation_status)¶ Excludes the specified installation status from appearing in the search results.
Parameters: installation_status (list) – List of string installation statuses. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_installation_type
(installation_type)¶ Excludes the specified installation type from appearing in the search results.
Parameters: installation_type (list) – List of string installation types. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_ip_address
(ip_address)¶ Excludes the specified IP address from appearing in the search results.
Parameters: ip_address (list) – List of string IP addresses. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_name
(name)¶ Excludes the specified name from appearing in the search results.
Parameters: name (list) – List of string names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_os_architecture
(os_architecture)¶ Excludes the specified OS architecture from appearing in the search results.
Parameters: os_architecture (list) – List of string OS architectures. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_os_description
(os_description)¶ Excludes the specified OS description from appearing in the search results.
Parameters: os_description (list) – List of string OS descriptions. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_os_type
(os_type)¶ Excludes the specified OS type from appearing in the search results.
Parameters: os_type (list) – List of string OS types. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_registration_id
(registration_id)¶ Excludes the specified registration ID from appearing in the search results.
Parameters: registration_id (list) – List of string registration IDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_uuid
(uuid)¶ Excludes the specified UUID from appearing in the search results.
Parameters: uuid (list) – List of string UUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_vcenter_host_url
(vcenter_host_url)¶ Excludes the specified vCenter host URL from appearing in the search results.
Parameters: vcenter_host_url (list) – List of string vCenter host URLs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_vcenter_name
(vcenter_name)¶ Excludes the specified vCenter name from appearing in the search results.
Parameters: vcenter_name (list) – List of string vCenter names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_vcenter_uuid
(vcenter_uuid)¶ Excludes the specified vCenter UUID from appearing in the search results.
Parameters: vcenter_uuid (list) – List of string vCenter UUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
exclude_vmwaretools_version
(vmwaretools_version)¶ Excludes the specified VMware Tools version from appearing in the search results.
Parameters: vmwaretools_version (list) – List of string VMware Tools versions. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_appliance_uuid
(appliance_uuid)¶ Restricts the search that this query is performed on to the specified appliance uuid.
Parameters: appliance_uuid (list) – List of string appliance uuids. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_cluster_name
(cluster_name)¶ Restricts the search that this query is performed on to the specified cluster name.
Parameters: cluster_name (list) – List of string cluster names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_datacenter_name
(datacenter_name)¶ Restricts the search that this query is performed on to the specified datacenter name.
Parameters: datacenter_name (list) – List of string datacenter names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_device_guid
(device_guid)¶ Restricts the search that this query is performed on to the specified device GUID.
Parameters: device_guid (list) – List of string device GUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_eligibility
(eligibility)¶ Restricts the search that this query is performed on to the specified eligibility.
Parameters: eligibility (list) – List of string eligibilities. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_eligibility_code
(eligibility_code)¶ Restricts the search that this query is performed on to the specified eligibility code.
Parameters: eligibility_code (list) – List of string eligibility codes. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_esx_host_name
(esx_host_name)¶ Restricts the search that this query is performed on to the specified ESX host name.
Parameters: esx_host_name (list) – List of string ESX host names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_esx_host_uuid
(esx_host_uuid)¶ Restricts the search that this query is performed on to the specified ESX host UUID.
Parameters: esx_host_uuid (list) – List of string ESX host UUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_host_name
(host_name)¶ Restricts the search that this query is performed on to the specified host name.
Parameters: host_name (list) – List of string host names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_installation_status
(installation_status)¶ Restricts the search that this query is performed on to the specified installation status.
Parameters: installation_status (list) – List of string installation status. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_installation_type
(installation_type)¶ Restricts the search that this query is performed on to the specified installation type.
Parameters: installation_type (list) – List of string installation types. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_ip_address
(ip_address)¶ Restricts the search that this query is performed on to the specified ip address.
Parameters: ip_address (list) – List of string ip addresses. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_name
(name)¶ Restricts the search that this query is performed on to the specified name.
Parameters: name (list) – List of string names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_os_architecture
(os_architecture)¶ Restricts the search that this query is performed on to the specified os architecture.
Parameters: os_architecture (list) – List of string os architecture. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_os_description
(os_description)¶ Restricts the search that this query is performed on to the specified os description.
Parameters: os_description (list) – List of string os description. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_os_type
(os_type)¶ Restricts the search that this query is performed on to the specified os type.
Parameters: os_type (list) – List of string os type. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_registration_id
(registration_id)¶ Restricts the search that this query is performed on to the specified registration ID.
Parameters: registration_id (list) – List of string registration IDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_uuid
(uuid)¶ Restricts the search that this query is performed on to the specified uuid.
Parameters: uuid (list) – List of string uuid. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_vcenter_host_url
(vcenter_host_url)¶ Restricts the search that this query is performed on to the specified vCenter host URL.
Parameters: vcenter_host_url (list) – List of string vCenter host URLs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_vcenter_name
(vcenter_name)¶ Restricts the search that this query is performed on to the specified vCenter name.
Parameters: vcenter_name (list) – List of string vCenter names. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_vcenter_uuid
(vcenter_uuid)¶ Restricts the search that this query is performed on to the specified vCenter UUID.
Parameters: vcenter_uuid (list) – List of string vCenter UUIDs. Returns: This instance. Return type: VCenterComputeResourceQuery
-
set_vmwaretools_version
(vmwaretools_version)¶ Restricts the search that this query is performed on to the specified VMware Tools version.
Parameters: vmwaretools_version (list) – List of string VMware Tools versions. Returns: This instance. Return type: VCenterComputeResourceQuery
-
log
= <Logger cbc_sdk.workload.vm_workloads_search (WARNING)>¶ Workloads Search model