VsanMassCollectorSpec

VsanMassCollectorSpec
VsanMassCollectorSpec

Spec for VsanMassCollector.VsanRetrieveProperties

This structure may be used only with operations rendered under /vsan.

AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "objects": [
        {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        }
    ],
    "objectCollection": "string",
    "properties": [
        "string"
    ],
    "propertiesParams": [
        {
            "_typeName": "string",
            "propertyName": "string",
            "propertyParams": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ]
        }
    ],
    "constraint": {
        "_typeName": "string",
        "targetType": "string"
    }
}
objects
Optional

List of ManagedObject to retrieve properties for.

These are typically HostSystem or ClusterComputeResource. The object type should be homogeneous (mixed-type is not supported) since we collecting the same properties for them. This parameter will be ignored when the objectCollection parameter is specified (i.e.

objectCollection =
    VsanMassCollectorObjectCollectionEnum.ALL_HOSTS

). Note that either the

objects

or the

objectCollection

parameter is required.

string
objectCollection
Optional

Specify mass hosts or clusters collection.

Support regular or vSAN enabled host or cluster objects. See VsanMassCollectorObjectCollectionEnumEnum for possible collection enum.

Note that either the

objects

or the

objectCollection

parameter is required.

See also VsanMassCollectorObjectCollectionEnumEnum.

array of string
properties
Required

List of properties to retrieve.

Properties for vSAN enabled ClusterComputeResource can be: a

  • d a
  • l a
  • r a
  • t c
  • a c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • l c
  • m d
  • a d
  • a d
  • p e
  • n e
  • s f
  • i h
  • c h
  • o h
  • o i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s i
  • s n
  • o n
  • u o
  • b o
  • b o
  • b p
  • h p
  • h p
  • r q
  • u q
  • u r
  • e r
  • u s
  • m s
  • p s
  • t s
  • t s
  • t s
  • u s
  • u s
  • y t
  • i t
  • r u
  • p v
  • e v
  • e v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s v
  • s w
  • i

Properties for vSAN enabled HostSystem can be: a

  • d a
  • l c
  • h c
  • l c
  • o d
  • a d
  • i d
  • i d
  • i e
  • n f
  • i h
  • c h
  • o h
  • o h
  • o h
  • o k
  • m n
  • e o
  • b p
  • h p
  • r s
  • t v
  • e v
  • e v
  • s v
  • s v
  • s v
  • s
propertiesParams
Optional

Some property required additional parameters to be passed in (e.g.

perfQuery).

Code example for perfQuery properties_params:

       def test_mass_collector_vsan_perf_query(vsanStub):
          mc = GetMassCollector(vsanStub)
          massCollectorSpec = build_mass_collector_spec(
             properties=['vsanPerf'],
             objectType='ALL_CLUSTERS',
             propertiesParams=[build_vsan_perf_params()])
          result = mc.VsanRetrieveProperties(massCollectorSpecs=[massCollectorSpec])

       def build_vsan_perf_params():
          return vim.VsanMassCollectorPropertyParams( propertyName='vsanPerf',
             propertyParams=[build_perf_query_specs()])

       def build_perf_query_specs():
          property_param = vim.KeyAnyValue()
          property_param.key = 'querySpecs'

          endTime = datetime.datetime.utcnow()
          startTime = endTime - datetime.timedelta(2)

          perfQuerySpec = vim.cluster.VsanPerfQuerySpec(
             entityRefId="*", startTime=startTime, endTime=endTime)

          property_param.value = vim.DynamicArray(val=[perfQuerySpec])
          return property_param

       def build_mass_collector_spec(properties=None, objectType=None,
          propertiesParams=None):
          massCollectorSpec = vim.VsanMassCollectorSpec()
          massCollectorSpec.properties = properties
          objCollection = vim.VsanMassCollectorObjectCollectionEnum(objectType)
          massCollectorSpec.objectCollection = objCollection
          if propertiesParams:
             massCollectorSpec.propertiesParams = propertiesParams
          return massCollectorSpec
constraint
Optional

Filter the returned result with VsanResourceConstraint