class Info(VapiStruct):
        """
        The ``Service.Info`` class contains information about a service. This class
        was added in vSphere API 6.7.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'state',
                {
                    'STARTED' : [('health', True), ('health_messages', True)],
                    'STARTING' : [],
                    'STOPPING' : [],
                    'STOPPED' : [],
                }
            ),
        ]



        def __init__(self,
                     name_key=None,
                     description_key=None,
                     startup_type=None,
                     state=None,
                     health=None,
                     health_messages=None,
                    ):
            """
            :type  name_key: :class:`str`
            :param name_key: Service name key. Can be used to lookup resource bundle. This
                attribute was added in vSphere API 6.7.
            :type  description_key: :class:`str`
            :param description_key: Service description key. Can be used to lookup resource bundle.
                This attribute was added in vSphere API 6.7.
            :type  startup_type: :class:`Service.StartupType`
            :param startup_type: Startup Type. This attribute was added in vSphere API 6.7.
            :type  state: :class:`Service.State`
            :param state: Running State. This attribute was added in vSphere API 6.7.
            :type  health: :class:`Service.Health`
            :param health: Health of service. This attribute was added in vSphere API 6.7.
                This attribute is optional and it is only relevant when the value
                of ``state`` is :attr:`Service.State.STARTED`.
            :type  health_messages: :class:`list` of :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param health_messages: Localizable messages associated with the health of the service.
                This attribute was added in vSphere API 6.7.
                This attribute is optional and it is only relevant when the value
                of ``state`` is :attr:`Service.State.STARTED`.
            """
            self.name_key = name_key
            self.description_key = description_key
            self.startup_type = startup_type
            self.state = state
            self.health = health
            self.health_messages = health_messages
            VapiStruct.__init__(self)
Ejemplo n.º 2
0
    class Config(VapiStruct):
        """
        The ``Ipv4.Config`` class provides defines the IPv4 configuration of a
        network interface. This class was added in vSphere API 6.7

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'mode',
                {
                    'STATIC' : [('address', True), ('prefix', True)],
                    'DHCP' : [],
                    'UNCONFIGURED' : [],
                }
            ),
        ]



        def __init__(self,
                     mode=None,
                     address=None,
                     prefix=None,
                     default_gateway=None,
                    ):
            """
            :type  mode: :class:`Ipv4.Mode`
            :param mode: The Address assignment mode. This attribute was added in vSphere
                API 6.7
            :type  address: :class:`str`
            :param address: The IPv4 address, for example, "10.20.80.191". This attribute was
                added in vSphere API 6.7
                This attribute is optional and it is only relevant when the value
                of ``mode`` is :attr:`Ipv4.Mode.STATIC`.
            :type  prefix: :class:`long`
            :param prefix: The IPv4 CIDR prefix, for example, 24. See
                http://www.oav.net/mirrors/cidr.html for netmask-to-prefix
                conversion. This attribute was added in vSphere API 6.7
                This attribute is optional and it is only relevant when the value
                of ``mode`` is :attr:`Ipv4.Mode.STATIC`.
            :type  default_gateway: :class:`str` or ``None``
            :param default_gateway: The IPv4 address of the default gateway. This configures the global
                default gateway on the appliance with the specified gateway address
                and interface. This gateway replaces the existing default gateway
                configured on the appliance. However, if the gateway address is
                link-local, then it is added for that interface. This does not
                support configuration of multiple global default gateways through
                different interfaces. This attribute was added in vSphere API 6.7
                If None, the defaultGateway was never set.
            """
            self.mode = mode
            self.address = address
            self.prefix = prefix
            self.default_gateway = default_gateway
            VapiStruct.__init__(self)
Ejemplo n.º 3
0
    class Entry(VapiStruct):
        """
        The ``Device.Entry`` class specifies a bootable virtual device class or
        specific bootable virtual device(s).

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'ETHERNET' : [('nic', True)],
                    'DISK' : [('disks', True)],
                    'CDROM' : [],
                    'FLOPPY' : [],
                }
            ),
        ]



        def __init__(self,
                     type=None,
                     nic=None,
                     disks=None,
                    ):
            """
            :type  type: :class:`Device.Type`
            :param type: Virtual device type.
            :type  nic: :class:`str`
            :param nic: Virtual Ethernet device. Ethernet device to use as boot device for
                this entry.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vcenter.vm.hardware.Ethernet``. When methods return a
                value of this class as a return value, the attribute will be an
                identifier for the resource type:
                ``com.vmware.vcenter.vm.hardware.Ethernet``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Device.Type.ETHERNET`.
            :type  disks: :class:`list` of :class:`str`
            :param disks: Virtual disk device. List of virtual disks in boot order.
                When clients pass a value of this class as a parameter, the
                attribute must contain identifiers for the resource type:
                ``com.vmware.vcenter.vm.hardware.Disk``. When methods return a
                value of this class as a return value, the attribute will contain
                identifiers for the resource type:
                ``com.vmware.vcenter.vm.hardware.Disk``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Device.Type.DISK`.
            """
            self.type = type
            self.nic = nic
            self.disks = disks
            VapiStruct.__init__(self)
class ArrayComplianceValue(VapiStruct):
    """
    The ``ArrayComplianceValue`` class contains attributes that describe the
    drift in an array of primitive data type values. Depending on the primitive
    data type of the configuration only one of the members in this structure is
    populated.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'type', {
                'BOOLEAN': [('bool_arr', False)],
                'LONG': [('long_arr', False)],
                'DOUBLE': [('double_arr', False)],
                'STRING': [('str_arr', False)],
                'SECRET': [('str_arr', False)],
                'BINARY': [],
                'USER_DATA': [],
            }),
    ]

    def __init__(
        self,
        type=None,
        bool_arr=None,
        long_arr=None,
        double_arr=None,
        str_arr=None,
    ):
        """
        :type  type: :class:`ComplianceValueType`
        :param type: Type of the configuration in drift.
        :type  bool_arr: :class:`BooleanComplianceValueArray` or ``None``
        :param bool_arr: Describes the drift in a boolean array of configuration values.
            This field is None if the type is not BOOLEAN.
        :type  long_arr: :class:`LongComplianceValueArray` or ``None``
        :param long_arr: Describes the drift in an integer(16 bit or 32 bit or 64 bit) array
            of configuration values.
            This field is None if the type is not Long.
        :type  double_arr: :class:`DoubleComplianceValueArray` or ``None``
        :param double_arr: Describes the drift in a floating point(float or double) array of
            configuration values.
            This field is None if the type is not DOUBLE.
        :type  str_arr: :class:`StringComplianceValueArray` or ``None``
        :param str_arr: Describes the drift in a strings array of configuration values.
            This field is None if the type is neither STRING nor SECRET.
        """
        self.type = type
        self.bool_arr = bool_arr
        self.long_arr = long_arr
        self.double_arr = double_arr
        self.str_arr = str_arr
        VapiStruct.__init__(self)
Ejemplo n.º 5
0
    class AddSpec(VapiStruct):
        """
        The ``File.AddSpec`` class describes the properties of the file to be
        uploaded.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'source_type',
                {
                    'PULL' : [('source_endpoint', True)],
                    'NONE' : [],
                    'PUSH' : [],
                }
            ),
        ]



        def __init__(self,
                     name=None,
                     source_type=None,
                     source_endpoint=None,
                     size=None,
                     checksum_info=None,
                    ):
            """
            :type  name: :class:`str`
            :param name: The name of the file being uploaded.
            :type  source_type: :class:`File.SourceType`
            :param source_type: The source type (NONE, PUSH, PULL) from which the file content will
                be retrieved.
            :type  source_endpoint: :class:`com.vmware.content.library.item_client.TransferEndpoint`
            :param source_endpoint: Location from which the Content Library Service will fetch the
                file, rather than requiring a client to upload the file.
                This attribute is optional and it is only relevant when the value
                of ``sourceType`` is :attr:`File.SourceType.PULL`.
            :type  size: :class:`long` or ``None``
            :param size: The file size, in bytes.
                If None, the server will not verify it received the correct size.
            :type  checksum_info: :class:`com.vmware.content.library.item_client.File.ChecksumInfo` or ``None``
            :param checksum_info: The checksum of the file. If specified, the server will verify the
                checksum once the file is received. If there is a mismatch, the
                upload will fail. For ova files, this value should not be set.
                If None, the server will not verify the checksum.
            """
            self.name = name
            self.source_type = source_type
            self.source_endpoint = source_endpoint
            self.size = size
            self.checksum_info = checksum_info
            VapiStruct.__init__(self)
Ejemplo n.º 6
0
    class CreateSpec(VapiStruct):
        """
        The ``Source.CreateSpec`` class contains the registration information of a
        CLI source.
        **Note:** This class is restricted for **VMware internal use only**.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'FILE' : [('filepath', True)],
                    'REMOTE' : [('address', True)],
                }
            ),
        ]



        def __init__(self,
                     description=None,
                     type=None,
                     filepath=None,
                     address=None,
                    ):
            """
            :type  description: :class:`str`
            :param description: English language human readable description of the source.
            :type  type: :class:`com.vmware.vapi.metadata_client.SourceType`
            :param type: Type of the metadata source.
            :type  filepath: :class:`str`
            :param filepath: Absolute file path of the metamodel metadata file that has the
                metamodel information about one component element.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.FILE`.
            :type  address: :class:`str`
            :param address: Connection information of the remote server. This should be of the
                format http(s)://IP:port/namespace. 
                
                The remote server should contain the classes in
                :mod:`com.vmware.vapi.metadata.metamodel_client` module. It could
                expose metamodel information of one or more components.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.REMOTE`.
            """
            self.description = description
            self.type = type
            self.filepath = filepath
            self.address = address
            VapiStruct.__init__(self)
Ejemplo n.º 7
0
    class Info(VapiStruct):
        """
        The ``Source.Info`` class contains the metadata source information.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'FILE' : [('filepath', True)],
                    'REMOTE' : [('address', True)],
                }
            ),
        ]



        def __init__(self,
                     description=None,
                     type=None,
                     filepath=None,
                     address=None,
                    ):
            """
            :type  description: :class:`str`
            :param description: English language human readable description of the source.
            :type  type: :class:`com.vmware.vapi.metadata_client.SourceType`
            :param type: Type of the metadata source.
            :type  filepath: :class:`str`
            :param filepath: Absolute file path of the privilege metadata file that has the
                privilege information about one component element. The ``filePath``
                is the path to the file in the server's filesystem.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.FILE`.
            :type  address: :class:`str`
            :param address: Connection information for the remote server. This must be in the
                format http(s)://IP:port/namespace. 
                
                The remote server must support the classes in the
                :mod:`com.vmware.vapi.metadata.privilege_client` module. It must
                expose privilege information of one or more components.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.REMOTE`.
            """
            self.description = description
            self.type = type
            self.filepath = filepath
            self.address = address
            VapiStruct.__init__(self)
    class GarbageCollection(VapiStruct):
        """
        The ``Harbor.GarbageCollection`` class contains garbage collection
        configuration for the Harbor registry.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'WEEKLY' : [('day_of_week', True), ('hour', True), ('minute', True)],
                    'DAILY' : [('hour', True), ('minute', True)],
                    'NONE' : [],
                }
            ),
        ]



        def __init__(self,
                     type=None,
                     day_of_week=None,
                     hour=None,
                     minute=None,
                    ):
            """
            :type  type: :class:`Recurrence`
            :param type: Frequency of garbage collection.
            :type  day_of_week: :class:`DayOfWeek`
            :param day_of_week: Day of the week when garbage collection should run.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Recurrence.WEEKLY`.
            :type  hour: :class:`long`
            :param hour: Hour at which garbage collection should run.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of :attr:`Recurrence.DAILY` or
                :attr:`Recurrence.WEEKLY`.
            :type  minute: :class:`long`
            :param minute: Minute at which garbage collection should run.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of :attr:`Recurrence.DAILY` or
                :attr:`Recurrence.WEEKLY`.
            """
            self.type = type
            self.day_of_week = day_of_week
            self.hour = hour
            self.minute = minute
            VapiStruct.__init__(self)
Ejemplo n.º 9
0
    class Info(VapiStruct):
        """
        Metadata source info.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'FILE' : [('filepath', True)],
                    'REMOTE' : [('address', True)],
                }
            ),
        ]



        def __init__(self,
                     description=None,
                     type=None,
                     filepath=None,
                     address=None,
                    ):
            """
            :type  description: :class:`str`
            :param description: Description of the source.
            :type  type: :class:`com.vmware.vapi.metadata_client.SourceType`
            :param type: Type of the metadata source.
            :type  filepath: :class:`str`
            :param filepath: Absolute file path of the file that has the metadata information.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.FILE`.
            :type  address: :class:`str`
            :param address: URI of the remote vAPI endpoint. This should be of the format
                http(s):IP:port/namespace.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`com.vmware.vapi.metadata_client.SourceType.REMOTE`.
            """
            self.description = description
            self.type = type
            self.filepath = filepath
            self.address = address
            VapiStruct.__init__(self)
class SourceInfo(VapiStruct):
    """
    Metadata source info

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'type', {
                'FILE': [('file_name', True)],
                'REMOTE': [('remote_addr', True), ('msg_protocol', True)],
            }),
    ]

    def __init__(
        self,
        type=None,
        file_name=None,
        remote_addr=None,
        msg_protocol=None,
    ):
        """
        :type  type: :class:`SourceType`
        :param type: Type of the metadata source
        :type  file_name: :class:`str`
        :param file_name: Name of the metadata source file
            This attribute is optional and it is only relevant when the value
            of ``type`` is :attr:`SourceType.FILE`.
        :type  remote_addr: :class:`str`
        :param remote_addr: Address of the remote metadata source
            This attribute is optional and it is only relevant when the value
            of ``type`` is :attr:`SourceType.REMOTE`.
        :type  msg_protocol: :class:`str`
        :param msg_protocol: Message protocol to be used
            This attribute is optional and it is only relevant when the value
            of ``type`` is :attr:`SourceType.REMOTE`.
        """
        self.type = type
        self.file_name = file_name
        self.remote_addr = remote_addr
        self.msg_protocol = msg_protocol
        VapiStruct.__init__(self)
    class Info(VapiStruct):
        """
        The ``Health.Info`` class contains health information about a container
        registry.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'status',
                {
                    'WARNING' : [('details', True)],
                    'ERROR' : [('details', True)],
                    'STARTING' : [],
                    'RUNNING' : [],
                    'DELETING' : [],
                }
            ),
        ]



        def __init__(self,
                     status=None,
                     details=None,
                    ):
            """
            :type  status: :class:`Health.Status`
            :param status: Container registry status.
            :type  details: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param details: Details about the status.
                If None, message details are not required for taking actions.
            """
            self.status = status
            self.details = details
            VapiStruct.__init__(self)
    class Summary(VapiStruct):
        """
        The ``Nodes.Summary`` class contains commonly used information of vCenter
        or Platform Services Controller node. This class was added in vSphere API
        6.7.2.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type', {
                    'VCSA_EMBEDDED': [('replication_partners', True)],
                    'PSC_EXTERNAL': [('replication_partners', True)],
                    'VCSA_EXTERNAL': [('client_affinity', True)],
                }),
        ]

        def __init__(
            self,
            node=None,
            type=None,
            replication_partners=None,
            client_affinity=None,
        ):
            """
            :type  node: :class:`str`
            :param node: Identifier for the vCenter or Platform Services Controller node.
                Identifier can be either IP address or DNS resolvable name of the
                node. This attribute was added in vSphere API 6.7.2.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vcenter.VCenter.name``. When methods return a value of
                this class as a return value, the attribute will be an identifier
                for the resource type: ``com.vmware.vcenter.VCenter.name``.
            :type  type: :class:`Nodes.ApplianceType`
            :param type: Appliance type of the node. This attribute was added in vSphere API
                6.7.2.
            :type  replication_partners: :class:`list` of :class:`str`
            :param replication_partners: List of replication partners' node identifiers. Identifiers can be
                either IP address or DNS resolvable name of the partner node. This
                attribute was added in vSphere API 6.7.2.
                When clients pass a value of this class as a parameter, the
                attribute must contain identifiers for the resource type:
                ``com.vmware.vcenter.VCenter.name``. When methods return a value of
                this class as a return value, the attribute will contain
                identifiers for the resource type:
                ``com.vmware.vcenter.VCenter.name``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of :attr:`Nodes.ApplianceType.VCSA_EMBEDDED` or
                :attr:`Nodes.ApplianceType.PSC_EXTERNAL`.
            :type  client_affinity: :class:`str`
            :param client_affinity: Identifier of the affinitized Platform Services Controller node.
                Identifier can be either IP address or DNS resolvable name of the
                affinitized node. This attribute was added in vSphere API 6.7.2.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vcenter.VCenter.name``. When methods return a value of
                this class as a return value, the attribute will be an identifier
                for the resource type: ``com.vmware.vcenter.VCenter.name``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Nodes.ApplianceType.VCSA_EXTERNAL`.
            """
            self.node = node
            self.type = type
            self.replication_partners = replication_partners
            self.client_affinity = client_affinity
            VapiStruct.__init__(self)
Ejemplo n.º 13
0
    class Info(VapiStruct):
        """
        The ``Details.Info`` class contains information about a backup job. This
        class was added in vSphere API 6.7.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'status', {
                    'SUCCEEDED': [('duration', True), ('size', True),
                                  ('progress', True), ('start_time', True),
                                  ('end_time', True)],
                    'FAILED': [('duration', True), ('size', True),
                               ('progress', True), ('error', False),
                               ('start_time', True), ('end_time', True)],
                    'RUNNING': [('duration', True), ('size', True),
                                ('progress', True), ('start_time', True)],
                    'BLOCKED': [('start_time', True)],
                    'PENDING': [],
                }),
        ]

        def __init__(
            self,
            location=None,
            duration=None,
            size=None,
            progress=None,
            location_user=None,
            type=None,
            messages=None,
            build=None,
            description=None,
            service=None,
            operation=None,
            parent=None,
            target=None,
            status=None,
            cancelable=None,
            error=None,
            start_time=None,
            end_time=None,
            user=None,
        ):
            """
            :type  location: :class:`str`
            :param location: URL of the backup location. This attribute was added in vSphere API
                6.7.
            :type  duration: :class:`long`
            :param duration: Time in seconds since the backup job was started or the time it
                took to complete the backup job. This attribute was added in
                vSphere API 6.7.
                This attribute is optional and it is only relevant when the value
                of ``#status`` is one of
                :attr:`com.vmware.cis.task_client.Status.SUCCEEDED`,
                :attr:`com.vmware.cis.task_client.Status.FAILED`, or
                :attr:`com.vmware.cis.task_client.Status.RUNNING`.
            :type  size: :class:`long`
            :param size: Size of the backup data transferred to remote location. This
                attribute was added in vSphere API 6.7.
                This attribute is optional and it is only relevant when the value
                of ``#status`` is one of
                :attr:`com.vmware.cis.task_client.Status.SUCCEEDED`,
                :attr:`com.vmware.cis.task_client.Status.FAILED`, or
                :attr:`com.vmware.cis.task_client.Status.RUNNING`.
            :type  progress: :class:`com.vmware.cis.task_client.Progress`
            :param progress: Progress of the job. This attribute was added in vSphere API 6.7.
                This attribute is optional and it is only relevant when the value
                of ``#status`` is one of
                :attr:`com.vmware.cis.task_client.Status.SUCCEEDED`,
                :attr:`com.vmware.cis.task_client.Status.FAILED`, or
                :attr:`com.vmware.cis.task_client.Status.RUNNING`.
            :type  location_user: :class:`str`
            :param location_user: The username for the remote backup location. This attribute was
                added in vSphere API 6.7.
            :type  type: :class:`Details.Type`
            :param type: Type of the backup job. Indicates whether the backup was started
                manually or as a scheduled backup. This attribute was added in
                vSphere API 6.7.
            :type  messages: :class:`list` of :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param messages: List of any info/warning/error messages returned by the backup job.
                This attribute was added in vSphere API 6.7.
            :type  build: :class:`Details.BuildInfo`
            :param build: Information about the build of the appliance. This attribute was
                added in vSphere API 6.7.2.
                This attribute is optional because it was added in a newer version
                than its parent node.
            :type  description: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param description: Description of the operation associated with the task.
            :type  service: :class:`str`
            :param service: Identifier of the service containing the operation.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vapi.service``. When methods return a value of this
                class as a return value, the attribute will be an identifier for
                the resource type: ``com.vmware.vapi.service``.
            :type  operation: :class:`str`
            :param operation: Identifier of the operation associated with the task.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vapi.operation``. When methods return a value of this
                class as a return value, the attribute will be an identifier for
                the resource type: ``com.vmware.vapi.operation``.
            :type  parent: :class:`str` or ``None``
            :param parent: Parent of the current task.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.cis.task``. When methods return a value of this class
                as a return value, the attribute will be an identifier for the
                resource type: ``com.vmware.cis.task``.
                This attribute will be None if the task has no parent.
            :type  target: :class:`com.vmware.vapi.std_client.DynamicID` or ``None``
            :param target: Identifier of the target created by the operation or an existing
                one the operation performed on.
                This attribute will be None if the operation has no target or
                multiple targets.
            :type  status: :class:`com.vmware.cis.task_client.Status`
            :param status: Status of the operation associated with the task.
            :type  cancelable: :class:`bool`
            :param cancelable: Flag to indicate whether or not the operation can be cancelled. The
                value may change as the operation progresses.
            :type  error: :class:`Exception` or ``None``
            :param error: Description of the error if the operation status is "FAILED".
                If None the description of why the operation failed will be
                included in the result of the operation (see
                :attr:`com.vmware.cis.task_client.Info.result`).
            :type  start_time: :class:`datetime.datetime`
            :param start_time: Time when the operation is started.
                This attribute is optional and it is only relevant when the value
                of ``status`` is one of
                :attr:`com.vmware.cis.task_client.Status.RUNNING`,
                :attr:`com.vmware.cis.task_client.Status.BLOCKED`,
                :attr:`com.vmware.cis.task_client.Status.SUCCEEDED`, or
                :attr:`com.vmware.cis.task_client.Status.FAILED`.
            :type  end_time: :class:`datetime.datetime`
            :param end_time: Time when the operation is completed.
                This attribute is optional and it is only relevant when the value
                of ``status`` is one of
                :attr:`com.vmware.cis.task_client.Status.SUCCEEDED` or
                :attr:`com.vmware.cis.task_client.Status.FAILED`.
            :type  user: :class:`str` or ``None``
            :param user: Name of the user who performed the operation.
                This attribute will be None if the operation is performed by the
                system.
            """
            self.location = location
            self.duration = duration
            self.size = size
            self.progress = progress
            self.location_user = location_user
            self.type = type
            self.messages = messages
            self.build = build
            self.description = description
            self.service = service
            self.operation = operation
            self.parent = parent
            self.target = target
            self.status = status
            self.cancelable = cancelable
            self.error = error
            self.start_time = start_time
            self.end_time = end_time
            self.user = user
            VapiStruct.__init__(self)
    class Info(VapiStruct):
        """
        The ``File.Info`` class defines the uploaded file.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'source_type', {
                    'PULL': [('source_endpoint', True)],
                    'PUSH': [('upload_endpoint', True)],
                    'NONE': [],
                }),
        ]

        def __init__(
            self,
            name=None,
            source_type=None,
            size=None,
            checksum_info=None,
            source_endpoint=None,
            upload_endpoint=None,
            bytes_transferred=None,
            status=None,
            error_message=None,
            keep_in_storage=None,
        ):
            """
            :type  name: :class:`str`
            :param name: The name of the file.
            :type  source_type: :class:`File.SourceType`
            :param source_type: The source type (NONE, PUSH, PULL) from which the file is being
                retrieved. This may be :attr:`File.SourceType.NONE` if the file is
                not being changed.
            :type  size: :class:`long` or ``None``
            :param size: The file size, in bytes as received by the server. This attribute
                is guaranteed to be set when the server has completely received the
                file.
                This attribute won't be set until the file status is
                :attr:`com.vmware.content.library.item_client.TransferStatus.READY`.
            :type  checksum_info: :class:`com.vmware.content.library.item_client.File.ChecksumInfo` or ``None``
            :param checksum_info: The checksum information of the file received by the server.
                If None, the server does not verify the checksum.
            :type  source_endpoint: :class:`com.vmware.content.library.item_client.TransferEndpoint`
            :param source_endpoint: A source endpoint from which to retrieve the file.
                This attribute is optional and it is only relevant when the value
                of ``sourceType`` is :attr:`File.SourceType.PULL`.
            :type  upload_endpoint: :class:`com.vmware.content.library.item_client.TransferEndpoint`
            :param upload_endpoint: An upload endpoint to which the client can push the content.
                This attribute is optional and it is only relevant when the value
                of ``sourceType`` is :attr:`File.SourceType.PUSH`.
            :type  bytes_transferred: :class:`long`
            :param bytes_transferred: The number of bytes of this file that have been received by the
                server.
            :type  status: :class:`com.vmware.content.library.item_client.TransferStatus`
            :param status: The transfer status (WAITING_FOR_TRANSFER, TRANSFERRING, READY,
                VALIDATING, ERROR) of this file.
            :type  error_message: :class:`com.vmware.vapi.std_client.LocalizableMessage` or ``None``
            :param error_message: Details about the transfer error.
                An error message is set if the status is
                :attr:`com.vmware.content.library.item_client.TransferStatus.ERROR`.
            :type  keep_in_storage: :class:`bool` or ``None``
            :param keep_in_storage: Whether or not the file will be kept in storage upon update session
                completion. The flag is true for most files, and false for metadata
                files such as manifest and certificate file of update session with
                library item type OVF. Any file with
                :attr:`File.Info.keep_in_storage` set to false will not show up in
                the list of files returned from
                :func:`com.vmware.content.library.item_client.File.list` upon
                update session completion. This attribute was added in vSphere API
                6.8.
                If None, the file will be kept in storage upon update session
                completion.
            """
            self.name = name
            self.source_type = source_type
            self.size = size
            self.checksum_info = checksum_info
            self.source_endpoint = source_endpoint
            self.upload_endpoint = upload_endpoint
            self.bytes_transferred = bytes_transferred
            self.status = status
            self.error_message = error_message
            self.keep_in_storage = keep_in_storage
            VapiStruct.__init__(self)
    class SessionInfo(VapiStruct):
        """
        The ``Providers.SessionInfo`` class contains sync session information.
        **Warning:** This class is available as Technology Preview. These are early
        access APIs provided to test, automate and provide feedback on the feature.
        Since this can change based on feedback, VMware does not guarantee
        backwards compatibility and recommends against using them in production
        environments. Some Technology Preview APIs might only be applicable to
        specific environments.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'stage',
                {
                    'FAILED' : [('completion_time', True), ('exception', True)],
                    'COMPLETED' : [('completion_time', True)],
                    'CHANGE_DETECTION' : [],
                    'CHANGE_ENUMERATION' : [],
                    'CHANGE_APPLICATION' : [],
                    'WAITING' : [],
                }
            ),
        ]



        def __init__(self,
                     stage=None,
                     completed_work=None,
                     total_work=None,
                     completion_time=None,
                     start_time=None,
                     exception=None,
                    ):
            """
            :type  stage: :class:`Providers.SessionInfo.Stage`
            :param stage: Sync stage for the session. **Warning:** This attribute is
                available as Technology Preview. These are early access APIs
                provided to test, automate and provide feedback on the feature.
                Since this can change based on feedback, VMware does not guarantee
                backwards compatibility and recommends against using them in
                production environments. Some Technology Preview APIs might only be
                applicable to specific environments.
            :type  completed_work: :class:`long`
            :param completed_work: Completed work for the session. **Warning:** This attribute is
                available as Technology Preview. These are early access APIs
                provided to test, automate and provide feedback on the feature.
                Since this can change based on feedback, VMware does not guarantee
                backwards compatibility and recommends against using them in
                production environments. Some Technology Preview APIs might only be
                applicable to specific environments.
            :type  total_work: :class:`long`
            :param total_work: Total work for the session. **Warning:** This attribute is
                available as Technology Preview. These are early access APIs
                provided to test, automate and provide feedback on the feature.
                Since this can change based on feedback, VMware does not guarantee
                backwards compatibility and recommends against using them in
                production environments. Some Technology Preview APIs might only be
                applicable to specific environments.
            :type  completion_time: :class:`datetime.datetime`
            :param completion_time: Time at which forced sync session was completed. **Warning:** This
                attribute is available as Technology Preview. These are early
                access APIs provided to test, automate and provide feedback on the
                feature. Since this can change based on feedback, VMware does not
                guarantee backwards compatibility and recommends against using them
                in production environments. Some Technology Preview APIs might only
                be applicable to specific environments.
                If None there is an ongoing sync that has not completed
            :type  start_time: :class:`datetime.datetime`
            :param start_time: Time at which force sync was initiated. **Warning:** This attribute
                is available as Technology Preview. These are early access APIs
                provided to test, automate and provide feedback on the feature.
                Since this can change based on feedback, VMware does not guarantee
                backwards compatibility and recommends against using them in
                production environments. Some Technology Preview APIs might only be
                applicable to specific environments.
            :type  exception: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param exception: Exception message if there is a sync failure on forced sync.
                **Warning:** This attribute is available as Technology Preview.
                These are early access APIs provided to test, automate and provide
                feedback on the feature. Since this can change based on feedback,
                VMware does not guarantee backwards compatibility and recommends
                against using them in production environments. Some Technology
                Preview APIs might only be applicable to specific environments.
                This attribute is optional and it is only relevant when the value
                of ``stage`` is :attr:`Providers.SessionInfo.Stage.FAILED`.
            """
            self.stage = stage
            self.completed_work = completed_work
            self.total_work = total_work
            self.completion_time = completion_time
            self.start_time = start_time
            self.exception = exception
            VapiStruct.__init__(self)


        class Stage(Enum):
            """
            The ``Providers.SessionInfo.Stage`` class defines the different stages of
            Sync. **Warning:** This enumeration is available as Technology Preview.
            These are early access APIs provided to test, automate and provide feedback
            on the feature. Since this can change based on feedback, VMware does not
            guarantee backwards compatibility and recommends against using them in
            production environments. Some Technology Preview APIs might only be
            applicable to specific environments.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            CHANGE_DETECTION = None
            """
            Changes are being detected on the source replica. **Warning:** This class
            attribute is available as Technology Preview. These are early access APIs
            provided to test, automate and provide feedback on the feature. Since this
            can change based on feedback, VMware does not guarantee backwards
            compatibility and recommends against using them in production environments.
            Some Technology Preview APIs might only be applicable to specific
            environments.

            """
            CHANGE_ENUMERATION = None
            """
            Changes from the source replica are being enumerated. **Warning:** This
            class attribute is available as Technology Preview. These are early access
            APIs provided to test, automate and provide feedback on the feature. Since
            this can change based on feedback, VMware does not guarantee backwards
            compatibility and recommends against using them in production environments.
            Some Technology Preview APIs might only be applicable to specific
            environments.

            """
            CHANGE_APPLICATION = None
            """
            Changes are being applied to the destination replica. **Warning:** This
            class attribute is available as Technology Preview. These are early access
            APIs provided to test, automate and provide feedback on the feature. Since
            this can change based on feedback, VMware does not guarantee backwards
            compatibility and recommends against using them in production environments.
            Some Technology Preview APIs might only be applicable to specific
            environments.

            """
            COMPLETED = None
            """
            Sync has completed. **Warning:** This class attribute is available as
            Technology Preview. These are early access APIs provided to test, automate
            and provide feedback on the feature. Since this can change based on
            feedback, VMware does not guarantee backwards compatibility and recommends
            against using them in production environments. Some Technology Preview APIs
            might only be applicable to specific environments.

            """
            FAILED = None
            """
            Sync failed. **Warning:** This class attribute is available as Technology
            Preview. These are early access APIs provided to test, automate and provide
            feedback on the feature. Since this can change based on feedback, VMware
            does not guarantee backwards compatibility and recommends against using
            them in production environments. Some Technology Preview APIs might only be
            applicable to specific environments.

            """
            WAITING = None
            """
            Session is waiting for progress to be set. **Warning:** This class
            attribute is available as Technology Preview. These are early access APIs
            provided to test, automate and provide feedback on the feature. Since this
            can change based on feedback, VMware does not guarantee backwards
            compatibility and recommends against using them in production environments.
            Some Technology Preview APIs might only be applicable to specific
            environments.

            """

            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`Stage` instance.
                """
                Enum.__init__(string)

        Stage._set_values([
            Stage('CHANGE_DETECTION'),
            Stage('CHANGE_ENUMERATION'),
            Stage('CHANGE_APPLICATION'),
            Stage('COMPLETED'),
            Stage('FAILED'),
            Stage('WAITING'),
        ])
        Stage._set_binding_type(type.EnumType(
            'com.vmware.vcenter.hvc.links.sync.providers.session_info.stage',
            Stage))
Ejemplo n.º 16
0
    class CreateSpec(VapiStruct):
        """
        The ``Services.CreateSpec`` class contains the data necessary for
        configuring a registered Key Provider Service instance with a cluster in
        the environment. This class was added in vSphere API 7.0.0.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type', {
                    'SERVICE': [('service', True)],
                    'CLUSTER': [('trust_authority_cluster', True)],
                }),
        ]

        def __init__(
            self,
            type=None,
            service=None,
            trust_authority_cluster=None,
        ):
            """
            :type  type: :class:`Services.CreateSpec.SourceType`
            :param type: Source of truth for the configuration of the Key Provider Service.
                This attribute was added in vSphere API 7.0.0.
            :type  service: :class:`str`
            :param service: The service's unique ID. This attribute was added in vSphere API
                7.0.0.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vcenter.trusted_infrastructure.kms.Service``. When
                methods return a value of this class as a return value, the
                attribute will be an identifier for the resource type:
                ``com.vmware.vcenter.trusted_infrastructure.kms.Service``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Services.CreateSpec.SourceType.SERVICE`.
            :type  trust_authority_cluster: :class:`str`
            :param trust_authority_cluster: The attestation cluster's unique ID. This attribute was added in
                vSphere API 7.0.0.
                This attribute is optional and it is only relevant when the value
                of ``type`` is :attr:`Services.CreateSpec.SourceType.CLUSTER`.
            """
            self.type = type
            self.service = service
            self.trust_authority_cluster = trust_authority_cluster
            VapiStruct.__init__(self)

        class SourceType(Enum):
            """
            The ``Services.CreateSpec.SourceType`` class specifies source of truth the
            Key Provider Service will use for its configuration. This enumeration was
            added in vSphere API 7.0.0.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            SERVICE = None
            """
            The Key Provider Service will be configured based on an ID of an specific
            Key Provider Service. This class attribute was added in vSphere API 7.0.0.

            """
            CLUSTER = None
            """
            The Key Provider Service will be configured based on an ID of a whole
            attestation cluster. This class attribute was added in vSphere API 7.0.0.

            """
            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`SourceType` instance.
                """
                Enum.__init__(string)

        SourceType._set_values([
            SourceType('SERVICE'),
            SourceType('CLUSTER'),
        ])
        SourceType._set_binding_type(
            type.EnumType(
                'com.vmware.vcenter.trusted_infrastructure.trusted_clusters.kms.services.create_spec.source_type',
                SourceType))
Ejemplo n.º 17
0
    class Summary(VapiStruct):
        """
        The ``Kms.Summary`` class contains all the stored information about a Key
        Provider Service. This class was added in vSphere API 7.0.0.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'summary_type', {
                    'BRIEF': [('host', True), ('address', True)],
                    'NORMAL': [('host', True), ('address', True),
                               ('group', True), ('cluster', True)],
                    'FULL': [('host', True), ('address', True),
                             ('group', True), ('cluster', True),
                             ('trusted_CA', True)],
                }),
        ]

        _canonical_to_pep_names = {
            'trusted_CA': 'trusted_ca',
        }

        def __init__(
            self,
            summary_type=None,
            host=None,
            address=None,
            group=None,
            cluster=None,
            trusted_ca=None,
        ):
            """
            :type  summary_type: :class:`Kms.SummaryType`
            :param summary_type: Defines the verbosity of the summary. This attribute was added in
                vSphere API 7.0.0.
            :type  host: :class:`str`
            :param host: The trusted ESX on which the service runs. This attribute was added
                in vSphere API 7.0.0.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``HostSystem``. When methods return a value of this class as a
                return value, the attribute will be an identifier for the resource
                type: ``HostSystem``.
                This attribute is optional and it is only relevant when the value
                of ``summaryType`` is one of :attr:`Kms.SummaryType.BRIEF`,
                :attr:`Kms.SummaryType.NORMAL`, or :attr:`Kms.SummaryType.FULL`.
            :type  address: :class:`com.vmware.vcenter.trusted_infrastructure_client.NetworkAddress`
            :param address: The service's address. This attribute was added in vSphere API
                7.0.0.
                This attribute is optional and it is only relevant when the value
                of ``summaryType`` is one of :attr:`Kms.SummaryType.BRIEF`,
                :attr:`Kms.SummaryType.NORMAL`, or :attr:`Kms.SummaryType.FULL`.
            :type  group: :class:`str`
            :param group: The group ID determines which Attestation Service instances this
                Key Provider Service can communicate with. This attribute was added
                in vSphere API 7.0.0.
                This attribute is optional and it is only relevant when the value
                of ``summaryType`` is one of :attr:`Kms.SummaryType.NORMAL` or
                :attr:`Kms.SummaryType.FULL`.
            :type  cluster: :class:`str`
            :param cluster: The opaque string identifier of the cluster in which the Key
                Provider Service is part of. This attribute was added in vSphere
                API 7.0.0.
                This attribute is optional and it is only relevant when the value
                of ``summaryType`` is one of :attr:`Kms.SummaryType.NORMAL` or
                :attr:`Kms.SummaryType.FULL`.
            :type  trusted_ca: :class:`com.vmware.vcenter.trusted_infrastructure_client.X509CertChain`
            :param trusted_ca: The service's TLS certificate chain. This attribute was added in
                vSphere API 7.0.0.
                This attribute is optional and it is only relevant when the value
                of ``summaryType`` is :attr:`Kms.SummaryType.FULL`.
            """
            self.summary_type = summary_type
            self.host = host
            self.address = address
            self.group = group
            self.cluster = cluster
            self.trusted_ca = trusted_ca
            VapiStruct.__init__(self)
    class Info(VapiStruct):
        """
        The ``Providers.Info`` class contains information about sync for a
        provider. **Warning:** This class is available as technical preview. It may
        be changed in a future release.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'status', {
                    'FAILED': [('status_message', True)],
                    'SUCCEEDED': [],
                    'NO_SYNC_FOUND': [],
                }),
        ]

        def __init__(
            self,
            last_sync_time=None,
            status=None,
            polling_interval_in_seconds=None,
            current_session_info=None,
            status_message=None,
        ):
            """
            :type  last_sync_time: :class:`datetime.datetime` or ``None``
            :param last_sync_time: Last sync time for the provider. This indicates the last time that
                either a background sync or a force sync was started for the
                provider. **Warning:** This attribute is available as technical
                preview. It may be changed in a future release.
                If None no sync was found for the provider.
            :type  status: :class:`Providers.Status`
            :param status: Last Sync status for the provider. **Warning:** This attribute is
                available as technical preview. It may be changed in a future
                release.
            :type  polling_interval_in_seconds: :class:`long`
            :param polling_interval_in_seconds: Sync Polling interval between local and remote replicas for the
                provider. **Warning:** This attribute is available as technical
                preview. It may be changed in a future release.
            :type  current_session_info: :class:`Providers.SessionInfo` or ``None``
            :param current_session_info: Returns information on the forced sync for the provider.
                **Warning:** This attribute is available as technical preview. It
                may be changed in a future release.
                If None there is no outstanding sync session created for this
                provider
            :type  status_message: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param status_message: Localizable messages associated with sync status. **Warning:** This
                attribute is available as technical preview. It may be changed in a
                future release.
                This attribute is optional and it is only relevant when the value
                of ``status`` is :attr:`Providers.Status.FAILED`.
            """
            self.last_sync_time = last_sync_time
            self.status = status
            self.polling_interval_in_seconds = polling_interval_in_seconds
            self.current_session_info = current_session_info
            self.status_message = status_message
            VapiStruct.__init__(self)
    class Info(VapiStruct):
        """
        The ``Providers.Info`` class contains information about sync for a
        provider. **Warning:** This class is available as Technology Preview. These
        are early access APIs provided to test, automate and provide feedback on
        the feature. Since this can change based on feedback, VMware does not
        guarantee backwards compatibility and recommends against using them in
        production environments. Some Technology Preview APIs might only be
        applicable to specific environments.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'status',
                {
                    'FAILED' : [('status_message', True)],
                    'SUCCEEDED' : [],
                    'NO_SYNC_FOUND' : [],
                }
            ),
        ]



        def __init__(self,
                     last_sync_time=None,
                     status=None,
                     polling_interval_in_seconds=None,
                     current_session_info=None,
                     status_message=None,
                    ):
            """
            :type  last_sync_time: :class:`datetime.datetime` or ``None``
            :param last_sync_time: Last sync time for the provider. This indicates the last time that
                either a background sync or a force sync was started for the
                provider. **Warning:** This attribute is available as Technology
                Preview. These are early access APIs provided to test, automate and
                provide feedback on the feature. Since this can change based on
                feedback, VMware does not guarantee backwards compatibility and
                recommends against using them in production environments. Some
                Technology Preview APIs might only be applicable to specific
                environments.
                If None no sync was found for the provider.
            :type  status: :class:`Providers.Status`
            :param status: Last Sync status for the provider. **Warning:** This attribute is
                available as Technology Preview. These are early access APIs
                provided to test, automate and provide feedback on the feature.
                Since this can change based on feedback, VMware does not guarantee
                backwards compatibility and recommends against using them in
                production environments. Some Technology Preview APIs might only be
                applicable to specific environments.
            :type  polling_interval_in_seconds: :class:`long`
            :param polling_interval_in_seconds: Sync Polling interval between local and remote replicas for the
                provider. **Warning:** This attribute is available as Technology
                Preview. These are early access APIs provided to test, automate and
                provide feedback on the feature. Since this can change based on
                feedback, VMware does not guarantee backwards compatibility and
                recommends against using them in production environments. Some
                Technology Preview APIs might only be applicable to specific
                environments.
            :type  current_session_info: :class:`Providers.SessionInfo` or ``None``
            :param current_session_info: Returns information on the forced sync for the provider.
                **Warning:** This attribute is available as Technology Preview.
                These are early access APIs provided to test, automate and provide
                feedback on the feature. Since this can change based on feedback,
                VMware does not guarantee backwards compatibility and recommends
                against using them in production environments. Some Technology
                Preview APIs might only be applicable to specific environments.
                If None there is no outstanding sync session created for this
                provider
            :type  status_message: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param status_message: Localizable messages associated with sync status. **Warning:** This
                attribute is available as Technology Preview. These are early
                access APIs provided to test, automate and provide feedback on the
                feature. Since this can change based on feedback, VMware does not
                guarantee backwards compatibility and recommends against using them
                in production environments. Some Technology Preview APIs might only
                be applicable to specific environments.
                This attribute is optional and it is only relevant when the value
                of ``status`` is :attr:`Providers.Status.FAILED`.
            """
            self.last_sync_time = last_sync_time
            self.status = status
            self.polling_interval_in_seconds = polling_interval_in_seconds
            self.current_session_info = current_session_info
            self.status_message = status_message
            VapiStruct.__init__(self)
class AuthenticationInfo(VapiStruct):
    """
    The ``AuthenticationInfo`` class describes the authentication information.
    Authentication information could be specified for a package element,
    service elenent or an operation element. 
    
    Using the authentication scheme information, a client invoking an API call
    from any class can figure out what kind of credentials are needed for that
    API call.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator('scheme_type', {
            'SESSION_AWARE': [('session_manager', True)],
            'SESSIONLESS': [],
        }),
    ]

    def __init__(
        self,
        scheme_type=None,
        session_manager=None,
        scheme=None,
    ):
        """
        :type  scheme_type: :class:`AuthenticationInfo.SchemeType`
        :param scheme_type: The type of the authentication scheme.
        :type  session_manager: :class:`str`
        :param session_manager: In a session aware authentication scheme, a session manager is
            required that supports ``create``, ``delete`` and ``keepAlive``
            methods. The fully qualified class name of the session manager is
            provided in :attr:`AuthenticationInfo.session_manager` attribute.
            This class is responsible for handling sessions.
            This attribute is optional and it is only relevant when the value
            of ``schemeType`` is
            :attr:`AuthenticationInfo.SchemeType.SESSION_AWARE`.
        :type  scheme: :class:`str`
        :param scheme: String identifier of the authentication scheme. 
            
            Following are the supported authentication schemes by the
            infrastructure: 
            
            * The identifier ``com.vmware.vapi.std.security.saml_hok_token``
              for SAML holder of key token based authentication mechanism.
            * The identifier ``com.vmware.vapi.std.security.bearer_token`` for
              SAML bearer token based authentication mechanism.
            * The identifier ``com.vmware.vapi.std.security.session_id`` for
              session based authentication mechanism.
            * The identifier ``com.vmware.vapi.std.security.user_pass`` for
              username and password based authentication mechanism.
        """
        self.scheme_type = scheme_type
        self.session_manager = session_manager
        self.scheme = scheme
        VapiStruct.__init__(self)

    class SchemeType(Enum):
        """
        The ``AuthenticationInfo.SchemeType`` class provides class attributes for
        the set of valid authentication scheme types.

        .. note::
            This class represents an enumerated type in the interface language
            definition. The class contains class attributes which represent the
            values in the current version of the enumerated type. Newer versions of
            the enumerated type may contain new values. To use new values of the
            enumerated type in communication with a server that supports the newer
            version of the API, you instantiate this class. See :ref:`enumerated
            type description page <enumeration_description>`.
        """
        SESSIONLESS = None
        """
        Indicates that the scheme is a session less authentication scheme, the user
        is authenticated on every method. There is no explicit session
        establishment.

        """
        SESSION_AWARE = None
        """
        Indicates that the scheme is a session aware authentication scheme. It
        requires an explicit login before executing a method and logout when a
        session terminates. A class might choose to have a session aware scheme if
        it wants to associate some state corresponding to the user until the user
        logs out or if it wants to mitigate the cost of authenticating the user on
        every method.

        """
        def __init__(self, string):
            """
            :type  string: :class:`str`
            :param string: String value for the :class:`SchemeType` instance.
            """
            Enum.__init__(string)

    SchemeType._set_values([
        SchemeType('SESSIONLESS'),
        SchemeType('SESSION_AWARE'),
    ])
    SchemeType._set_binding_type(
        type.EnumType(
            'com.vmware.vapi.metadata.authentication.authentication_info.scheme_type',
            SchemeType))
class InvocationResult(VapiStruct):
    """
    Information about the result from an interposed operation invocation. All
    POST interposers will receive an instance of this structure.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'result_type',
            {
                'NORMAL_RESULT' : [('output', True)],
                'ERROR_RESULT' : [('error', True)],
            }
        ),
    ]



    def __init__(self,
                 result_type=None,
                 output=None,
                 error=None,
                ):
        """
        :type  result_type: :class:`InvocationResult.ResultType`
        :param result_type: Type of the invocation result.
        :type  output: :class:`DataValue`
        :param output: Normal result value.
            This attribute is optional and it is only relevant when the value
            of ``resultType`` is
            :attr:`InvocationResult.ResultType.NORMAL_RESULT`.
        :type  error: :class:`vmware.vapi.struct.VapiStruct`
        :param error: Error result value.
            This attribute is optional and it is only relevant when the value
            of ``resultType`` is
            :attr:`InvocationResult.ResultType.ERROR_RESULT`.
        """
        self.result_type = result_type
        self.output = output
        self.error = error
        VapiStruct.__init__(self)


    class ResultType(Enum):
        """
        Type of the invocation result.

        .. note::
            This class represents an enumerated type in the interface language
            definition. The class contains class attributes which represent the
            values in the current version of the enumerated type. Newer versions of
            the enumerated type may contain new values. To use new values of the
            enumerated type in communication with a server that supports the newer
            version of the API, you instantiate this class. See :ref:`enumerated
            type description page <enumeration_description>`.
        """
        NORMAL_RESULT = None
        """
        Normal invocation result.

        """
        ERROR_RESULT = None
        """
        Error invocation result.

        """

        def __init__(self, string):
            """
            :type  string: :class:`str`
            :param string: String value for the :class:`ResultType` instance.
            """
            Enum.__init__(string)

    ResultType._set_values([
        ResultType('NORMAL_RESULT'),
        ResultType('ERROR_RESULT'),
    ])
    ResultType._set_binding_type(type.EnumType(
        'com.vmware.vapi.std.interposition.invocation_result.result_type',
        ResultType))
Ejemplo n.º 22
0
    class Info(VapiStruct):
        """
        The ``Job.Info`` class represents the reconciliation job information. It
        contains information related to current Status, any associated messages and
        progress as percentage. This class was added in vSphere API 6.7

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'status', {
                    'FAILED': [('error', False), ('start_time', True),
                               ('end_time', True)],
                    'RUNNING': [('start_time', True)],
                    'SUCCEEDED': [('start_time', True), ('end_time', True)],
                    'NONE': [],
                }),
        ]

        def __init__(
            self,
            description=None,
            service=None,
            operation=None,
            parent=None,
            target=None,
            status=None,
            cancelable=None,
            error=None,
            start_time=None,
            end_time=None,
            messages=None,
            progress=None,
        ):
            """
            :type  description: :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param description: Description of the operation associated with the task. This
                attribute was added in vSphere API 6.7
            :type  service: :class:`str`
            :param service: Name of the service containing the operation. This attribute was
                added in vSphere API 6.7
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.appliance.recovery.reconciliation.job``. When methods
                return a value of this class as a return value, the attribute will
                be an identifier for the resource type:
                ``com.vmware.appliance.recovery.reconciliation.job``.
            :type  operation: :class:`str`
            :param operation: Name of the operation associated with the task. This attribute was
                added in vSphere API 6.7
            :type  parent: :class:`str` or ``None``
            :param parent: Parent of the current task. This attribute was added in vSphere API
                6.7
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.appliance.recovery.reconciliation.job``. When methods
                return a value of this class as a return value, the attribute will
                be an identifier for the resource type:
                ``com.vmware.appliance.recovery.reconciliation.job``.
                This attribute will be None if the task has no parent.
            :type  target: :class:`com.vmware.vapi.std_client.DynamicID` or ``None``
            :param target: Identifier of the target resource the operation modifies. This
                attribute was added in vSphere API 6.7
                This attribute will be None if the task has multiple targets or no
                target.
            :type  status: :class:`Job.Status`
            :param status: Status of the operation associated with the task. This attribute
                was added in vSphere API 6.7
            :type  cancelable: :class:`bool` or ``None``
            :param cancelable: Flag to indicate whether or not the operation can be cancelled. The
                value may change as the operation progresses. This attribute was
                added in vSphere API 6.7
                If None, the operation cannot be canceled.
            :type  error: :class:`Exception` or ``None``
            :param error: Description of the error if the operation status is "FAILED". This
                attribute was added in vSphere API 6.7
                If None the description of why the operation failed will be
                included in the result of the operation (see null).
            :type  start_time: :class:`datetime.datetime`
            :param start_time: Time when the operation is started. This attribute was added in
                vSphere API 6.7
                This attribute is optional and it is only relevant when the value
                of ``status`` is one of :attr:`Job.Status.RUNNING`,
                :attr:`Job.Status.SUCCEEDED`, or :attr:`Job.Status.FAILED`.
            :type  end_time: :class:`datetime.datetime`
            :param end_time: Time when the operation is completed. This attribute was added in
                vSphere API 6.7
                This attribute is optional and it is only relevant when the value
                of ``status`` is one of :attr:`Job.Status.SUCCEEDED` or
                :attr:`Job.Status.FAILED`.
            :type  messages: :class:`list` of :class:`com.vmware.vapi.std_client.LocalizableMessage`
            :param messages: A list of localized messages. This attribute was added in vSphere
                API 6.7
            :type  progress: :class:`long`
            :param progress: The progress of the job as a percentage. This attribute was added
                in vSphere API 6.7
            """
            self.description = description
            self.service = service
            self.operation = operation
            self.parent = parent
            self.target = target
            self.status = status
            self.cancelable = cancelable
            self.error = error
            self.start_time = start_time
            self.end_time = end_time
            self.messages = messages
            self.progress = progress
            VapiStruct.__init__(self)
Ejemplo n.º 23
0
    class Result(VapiStruct):
        """
        The ``Clusters.Result`` class contains the result of batch upgrade method.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator('res', {
                'REJECTED': [('exception', True)],
                'STARTED': [],
            }),
        ]

        def __init__(
            self,
            res=None,
            exception=None,
        ):
            """
            :type  res: :class:`Clusters.Result.Res`
            :param res: The result of batch upgrade method.
            :type  exception: :class:`Exception`
            :param exception: Exception when cluster pre-check failed during upgrade invocation.
                This attribute is optional and it is only relevant when the value
                of ``res`` is :attr:`Clusters.Result.Res.REJECTED`.
            """
            self.res = res
            self.exception = exception
            VapiStruct.__init__(self)

        class Res(Enum):
            """
            The ``Clusters.Result.Res`` class represents the upgrade invocation result
            for each cluster.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            STARTED = None
            """
            Upgrade is started.

            """
            REJECTED = None
            """
            Upgrade is rejected. This implies pre-check failed when invoking upgrade of
            the cluster.

            """
            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`Res` instance.
                """
                Enum.__init__(string)

        Res._set_values([
            Res('STARTED'),
            Res('REJECTED'),
        ])
        Res._set_binding_type(
            type.EnumType(
                'com.vmware.vcenter.namespace_management.software.clusters.result.res',
                Res))
Ejemplo n.º 24
0
    class ConnectionStatus(VapiStruct):
        """


        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'state',
                {
                    'DOWN' : [('message', False)],
                    'UP' : [],
                    'UNKNOWN' : [],
                }
            ),
        ]



        def __init__(self,
                     hostname=None,
                     state=None,
                     message=None,
                    ):
            """
            :type  hostname: :class:`str`
            :param hostname: FQDN or IP address of the configured remote logging servers. This
                attribute was added in vSphere API 6.7.
            :type  state: :class:`Forwarding.ConnectionStatus.State`
            :param state: State of the configured remote logging server. This attribute was
                added in vSphere API 6.7.
            :type  message: :class:`com.vmware.vapi.std_client.LocalizableMessage` or ``None``
            :param message: Message associated with the state of the configured remote logging
                server. This attribute was added in vSphere API 6.7.
                If None, there is no message to be shown.
            """
            self.hostname = hostname
            self.state = state
            self.message = message
            VapiStruct.__init__(self)


        class State(Enum):
            """
            The ``Forwarding.ConnectionStatus.State`` class defines the state values
            that a remote logging server can be in. This enumeration was added in
            vSphere API 6.7.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            UP = None
            """
            The remote logging server is reachable. This class attribute was added in
            vSphere API 6.7.

            """
            DOWN = None
            """
            The remote logging server is not reachable. This class attribute was added
            in vSphere API 6.7.

            """
            UNKNOWN = None
            """
            The status of remote logging server is unknown. This class attribute was
            added in vSphere API 6.7.

            """

            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`State` instance.
                """
                Enum.__init__(string)

        State._set_values([
            State('UP'),
            State('DOWN'),
            State('UNKNOWN'),
        ])
        State._set_binding_type(type.EnumType(
            'com.vmware.appliance.logging.forwarding.connection_status.state',
            State))
Ejemplo n.º 25
0
    class DataDefinition(VapiStruct):
        """
        The :class:`Operation.DataDefinition` structure describes a vAPI data type.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type', {
                    'OPTIONAL': [('element_definition', True)],
                    'LIST': [('element_definition', True)],
                    'STRUCTURE': [('name', True), ('fields', True)],
                    'STRUCTURE_REF': [('name', True)],
                    'ERROR': [('name', True), ('fields', True)],
                    'BINARY': [],
                    'BOOLEAN': [],
                    'DOUBLE': [],
                    'DYNAMIC_STRUCTURE': [],
                    'ANY_ERROR': [],
                    'LONG': [],
                    'OPAQUE': [],
                    'SECRET': [],
                    'STRING': [],
                    'VOID': [],
                }),
        ]

        def __init__(
            self,
            type=None,
            element_definition=None,
            name=None,
            fields=None,
        ):
            """
            :type  type: :class:`Operation.DataDefinition.DataType`
            :param type: Data type of the value.
            :type  element_definition: :class:`Operation.DataDefinition`
            :param element_definition: Contains the element definition for generic data types like List
                and Optional.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of
                :attr:`Operation.DataDefinition.DataType.OPTIONAL` or
                :attr:`Operation.DataDefinition.DataType.LIST`.
            :type  name: :class:`str`
            :param name: Fully qualified name of the structure.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of
                :attr:`Operation.DataDefinition.DataType.STRUCTURE`,
                :attr:`Operation.DataDefinition.DataType.STRUCTURE_REF`, or
                :attr:`Operation.DataDefinition.DataType.ERROR`.
            :type  fields: :class:`dict` of :class:`str` and :class:`Operation.DataDefinition`
            :param fields: Fields of the structure type. The key of the map is the canonical
                name of the field and the value is the
                :class:`Operation.DataDefinition` for the field. The order of the
                structure fields defined in IDL is not maintained by the
                :class:`Operation` service.
                This attribute is optional and it is only relevant when the value
                of ``type`` is one of
                :attr:`Operation.DataDefinition.DataType.STRUCTURE` or
                :attr:`Operation.DataDefinition.DataType.ERROR`.
            """
            self.type = type
            self.element_definition = element_definition
            self.name = name
            self.fields = fields
            VapiStruct.__init__(self)

        class DataType(Enum):
            """
            The :class:`Operation.DataDefinition.DataType` enumeration provides values
            representing the data types supported by the vAPI infrastructure.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            BINARY = None
            """
            Indicates the value is a binary type.

            """
            BOOLEAN = None
            """
            Indicates the value is a boolean type. The possible values are True and
            False equivalent of the language used to invoke this operation.

            """
            DOUBLE = None
            """
            Indicates the value is a double type. It is a 64 bit floating point number.

            """
            DYNAMIC_STRUCTURE = None
            """
            Indicates the value is a dynamic structure. This means, any data of type
            :attr:`Operation.DataDefinition.DataType.STRUCTURE` can be used.

            """
            ERROR = None
            """
            Indicates the value is a specific error type.

            """
            ANY_ERROR = None
            """
            Indicates the value is arbitrary error type. This means, any data of type
            :attr:`Operation.DataDefinition.DataType.ERROR` can be used.

            """
            LIST = None
            """
            Indicates the value is a list data type. Any value of this type can have
            zero or more elements in the list.

            """
            LONG = None
            """
            Indicates the value is a long data type. It is a 64 bit signed integer
            number.

            """
            OPAQUE = None
            """
            Indicates the value is an opaque type. This means, data of any
            :class:`Operation.DataDefinition.DataType` can be used.

            """
            OPTIONAL = None
            """
            Indicates the value is an optional data type. Any value of this type can be
            null.

            """
            SECRET = None
            """
            Indicates the value is a secret data type. This is used for sensitive
            information. The server will not log any data of this type and if possible
            wipe the data from the memory after usage.

            """
            STRING = None
            """
            Indicates the value is a string data type. This is a unicode string.

            """
            STRUCTURE = None
            """
            Indicates the value is a structure data type. A structure has string
            identifier and a set of fields with corresponding values.

            """
            STRUCTURE_REF = None
            """
            Indicates the value is a structure reference. This is used to break
            circular dependencies in the type references. This just has a string
            identifier of the structure. Clients have to maintain a list of structures
            already visited and use that to resolve this reference.

            """
            VOID = None
            """
            Indicates the value is a void data type.

            """
            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`DataType` instance.
                """
                Enum.__init__(string)

        DataType._set_values([
            DataType('BINARY'),
            DataType('BOOLEAN'),
            DataType('DOUBLE'),
            DataType('DYNAMIC_STRUCTURE'),
            DataType('ERROR'),
            DataType('ANY_ERROR'),
            DataType('LIST'),
            DataType('LONG'),
            DataType('OPAQUE'),
            DataType('OPTIONAL'),
            DataType('SECRET'),
            DataType('STRING'),
            DataType('STRUCTURE'),
            DataType('STRUCTURE_REF'),
            DataType('VOID'),
        ])
        DataType._set_binding_type(
            type.EnumType(
                'com.vmware.vapi.std.introspection.operation.data_definition.data_type',
                DataType))
    class VmHomePolicySpec(VapiStruct):
        """
        The ``Policy.VmHomePolicySpec`` class provides a specification for the
        storage policy to be associated with the virtual machine home's directory.
        This class was added in vSphere API 6.7.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'type',
                {
                    'USE_SPECIFIED_POLICY' : [('policy', True)],
                    'USE_DEFAULT_POLICY' : [],
                }
            ),
        ]



        def __init__(self,
                     type=None,
                     policy=None,
                    ):
            """
            :type  type: :class:`Policy.VmHomePolicySpec.PolicyType`
            :param type: Policy type to be used while performing update operation on the
                virtual machine home's directory. This attribute was added in
                vSphere API 6.7.
            :type  policy: :class:`str`
            :param policy: Storage Policy identification. This attribute was added in vSphere
                API 6.7.
                When clients pass a value of this class as a parameter, the
                attribute must be an identifier for the resource type:
                ``com.vmware.vcenter.StoragePolicy``. When methods return a value
                of this class as a return value, the attribute will be an
                identifier for the resource type:
                ``com.vmware.vcenter.StoragePolicy``.
                This attribute is optional and it is only relevant when the value
                of ``type`` is
                :attr:`Policy.VmHomePolicySpec.PolicyType.USE_SPECIFIED_POLICY`.
            """
            self.type = type
            self.policy = policy
            VapiStruct.__init__(self)


        class PolicyType(Enum):
            """
            The ``Policy.VmHomePolicySpec.PolicyType`` class defines the choices for
            how to specify the policy to be associated with the virtual machine home's
            directory. This enumeration was added in vSphere API 6.7.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            USE_SPECIFIED_POLICY = None
            """
            Use the specified policy (see :attr:`Policy.VmHomePolicySpec.policy`). This
            class attribute was added in vSphere API 6.7.

            """
            USE_DEFAULT_POLICY = None
            """
            Use the default storage policy of the datastore. This class attribute was
            added in vSphere API 6.7.

            """

            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`PolicyType` instance.
                """
                Enum.__init__(string)

        PolicyType._set_values([
            PolicyType('USE_SPECIFIED_POLICY'),
            PolicyType('USE_DEFAULT_POLICY'),
        ])
        PolicyType._set_binding_type(type.EnumType(
            'com.vmware.vcenter.vm.storage.policy.vm_home_policy_spec.policy_type',
            PolicyType))
class PreviewInfo(VapiStruct):
    """
    The ``PreviewInfo`` class contains information about the files being
    uploaded in the update session. This class was added in vSphere API 6.8.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'state', {
                'AVAILABLE': [('certificate_info', False), ('warnings', True)],
                'UNAVAILABLE': [],
                'NOT_APPLICABLE': [],
                'PREPARING': [],
            }),
    ]

    def __init__(
        self,
        state=None,
        certificate_info=None,
        warnings=None,
    ):
        """
        :type  state: :class:`PreviewInfo.State`
        :param state: Indicates the state of the preview of the update session. This
            attribute was added in vSphere API 6.8.
        :type  certificate_info: :class:`CertificateInfo` or ``None``
        :param certificate_info: The certificate information of the signed update session content.
            This attribute was added in vSphere API 6.8.
            This attribute is None if the update session content is not signed.
        :type  warnings: :class:`list` of :class:`PreviewWarningInfo`
        :param warnings: The list of warnings raised for this update session. Any warning
            which is not ignored by the client will, by default, fail the
            update session during session complete operation. This attribute
            was added in vSphere API 6.8.
            This attribute is optional and it is only relevant when the value
            of ``state`` is :attr:`PreviewInfo.State.AVAILABLE`.
        """
        self.state = state
        self.certificate_info = certificate_info
        self.warnings = warnings
        VapiStruct.__init__(self)

    class State(Enum):
        """
        The ``PreviewInfo.State`` class defines the state of the update session's
        preview. This enumeration was added in vSphere API 6.8.

        .. note::
            This class represents an enumerated type in the interface language
            definition. The class contains class attributes which represent the
            values in the current version of the enumerated type. Newer versions of
            the enumerated type may contain new values. To use new values of the
            enumerated type in communication with a server that supports the newer
            version of the API, you instantiate this class. See :ref:`enumerated
            type description page <enumeration_description>`.
        """
        UNAVAILABLE = None
        """
        There are no files in the update session OR a preview is not possible for
        the files currently in the update session. However, preview may be possible
        after metadata files such as OVF descriptor are added to the session. In
        this case the state will transition to ``PREPARING``. This class attribute
        was added in vSphere API 6.8.

        """
        NOT_APPLICABLE = None
        """
        Preview is not possible for this update session. This state is reached when
        there are no metadata files in the update session and user invokes a
        session complete operation. This class attribute was added in vSphere API
        6.8.

        """
        PREPARING = None
        """
        A preview is being prepared for the files currently in the update session.
        This state is reached when the applicable metadata files are added to the
        update session but their content is not fully uploaded yet. For OVF item
        type, this state indicates that the OVF descriptor file is currently being
        uploaded. This class attribute was added in vSphere API 6.8.

        """
        AVAILABLE = None
        """
        Preview is available for this update session. It is possible to review
        certificate details and warnings, if any. This state is reached when the
        applicable metadata files in the session have been fully uploaded. This
        class attribute was added in vSphere API 6.8.

        """
        def __init__(self, string):
            """
            :type  string: :class:`str`
            :param string: String value for the :class:`State` instance.
            """
            Enum.__init__(string)

    State._set_values([
        State('UNAVAILABLE'),
        State('NOT_APPLICABLE'),
        State('PREPARING'),
        State('AVAILABLE'),
    ])
    State._set_binding_type(
        type.EnumType(
            'com.vmware.content.library.item.updatesession.preview_info.state',
            State))
class Question(VapiStruct):
    """
    The ``Question`` class describes a item of information that must be
    provided by the user in order to perform the update.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'type', {
                'PLAIN_TEXT': [('allowed_values', False),
                               ('default_answer', False)],
                'BOOLEAN': [('default_answer', False)],
                'PASSWORD': [],
            }),
    ]

    def __init__(
        self,
        data_item=None,
        text=None,
        description=None,
        type=None,
        allowed_values=None,
        default_answer=None,
    ):
        """
        :type  data_item: :class:`str`
        :param data_item: ID of the data item
            When clients pass a value of this class as a parameter, the
            attribute must be an identifier for the resource type:
            ``com.vmware.vcenter.lcm.common.dataitem``. When methods return a
            value of this class as a return value, the attribute will be an
            identifier for the resource type:
            ``com.vmware.vcenter.lcm.common.dataitem``.
        :type  text: :class:`com.vmware.vapi.std_client.LocalizableMessage`
        :param text: Label for the item
        :type  description: :class:`com.vmware.vapi.std_client.LocalizableMessage`
        :param description: Description of the item
        :type  type: :class:`Question.InputType`
        :param type: The type of the field.
        :type  allowed_values: :class:`list` of :class:`str` or ``None``
        :param allowed_values: List of allowed values
            allowedValues If None any value is valid.
        :type  default_answer: :class:`str` or ``None``
        :param default_answer: Default answer
            defaultAnswer If None then there is no default answer, so an
            explicit answer must be provided
        """
        self.data_item = data_item
        self.text = text
        self.description = description
        self.type = type
        self.allowed_values = allowed_values
        self.default_answer = default_answer
        VapiStruct.__init__(self)

    class InputType(Enum):
        """
        The ``Question.InputType`` class defines the supported field types for
        questions.

        .. note::
            This class represents an enumerated type in the interface language
            definition. The class contains class attributes which represent the
            values in the current version of the enumerated type. Newer versions of
            the enumerated type may contain new values. To use new values of the
            enumerated type in communication with a server that supports the newer
            version of the API, you instantiate this class. See :ref:`enumerated
            type description page <enumeration_description>`.
        """
        PLAIN_TEXT = None
        """
        Plain text answer.

        """
        BOOLEAN = None
        """
        Yes/No,On/Off,Checkbox answer.

        """
        PASSWORD = None
        """
        Password (masked) answer.

        """
        def __init__(self, string):
            """
            :type  string: :class:`str`
            :param string: String value for the :class:`InputType` instance.
            """
            Enum.__init__(string)

    InputType._set_values([
        InputType('PLAIN_TEXT'),
        InputType('BOOLEAN'),
        InputType('PASSWORD'),
    ])
    InputType._set_binding_type(
        type.EnumType('com.vmware.vcenter.lcm.common.question.input_type',
                      InputType))
class Info(VapiStruct):
    """
    The ``Info`` class contains information about a task.

    .. tip::
        The arguments are used to initialize data attributes with the same
        names.
    """

    _validator_list = [
        UnionValidator(
            'status',
            {
                'RUNNING' : [('progress', True), ('result', False), ('start_time', True)],
                'BLOCKED' : [('progress', True), ('result', False), ('start_time', True)],
                'SUCCEEDED' : [('progress', True), ('result', False), ('start_time', True), ('end_time', True)],
                'FAILED' : [('progress', True), ('result', False), ('error', False), ('start_time', True), ('end_time', True)],
                'PENDING' : [],
            }
        ),
    ]



    def __init__(self,
                 progress=None,
                 result=None,
                 description=None,
                 service=None,
                 operation=None,
                 parent=None,
                 target=None,
                 status=None,
                 cancelable=None,
                 error=None,
                 start_time=None,
                 end_time=None,
                 user=None,
                ):
        """
        :type  progress: :class:`Progress`
        :param progress: Progress of the operation.
            This attribute is optional and it is only relevant when the value
            of ``#status`` is one of :attr:`Status.RUNNING`,
            :attr:`Status.BLOCKED`, :attr:`Status.SUCCEEDED`, or
            :attr:`Status.FAILED`.
        :type  result: :class:`DataValue` or ``None``
        :param result: Result of the operation. If an operation reports partial results
            before it completes, this attribute could be :class:`set` before
            the :attr:`CommonInfo.status` has the value
            :attr:`Status.SUCCEEDED`. The value could change as the operation
            progresses.
            This attribute will be None if the operation does not return a
            result or if the result is not available at the current step of the
            operation.
        :type  description: :class:`com.vmware.vapi.std_client.LocalizableMessage`
        :param description: Description of the operation associated with the task.
        :type  service: :class:`str`
        :param service: Identifier of the service containing the operation.
            When clients pass a value of this class as a parameter, the
            attribute must be an identifier for the resource type:
            ``com.vmware.vapi.service``. When methods return a value of this
            class as a return value, the attribute will be an identifier for
            the resource type: ``com.vmware.vapi.service``.
        :type  operation: :class:`str`
        :param operation: Identifier of the operation associated with the task.
            When clients pass a value of this class as a parameter, the
            attribute must be an identifier for the resource type:
            ``com.vmware.vapi.operation``. When methods return a value of this
            class as a return value, the attribute will be an identifier for
            the resource type: ``com.vmware.vapi.operation``.
        :type  parent: :class:`str` or ``None``
        :param parent: Parent of the current task.
            When clients pass a value of this class as a parameter, the
            attribute must be an identifier for the resource type:
            ``com.vmware.cis.task``. When methods return a value of this class
            as a return value, the attribute will be an identifier for the
            resource type: ``com.vmware.cis.task``.
            This attribute will be None if the task has no parent.
        :type  target: :class:`com.vmware.vapi.std_client.DynamicID` or ``None``
        :param target: Identifier of the target created by the operation or an existing
            one the operation performed on.
            This attribute will be None if the operation has no target or
            multiple targets.
        :type  status: :class:`Status`
        :param status: Status of the operation associated with the task.
        :type  cancelable: :class:`bool`
        :param cancelable: Flag to indicate whether or not the operation can be cancelled. The
            value may change as the operation progresses.
        :type  error: :class:`Exception` or ``None``
        :param error: Description of the error if the operation status is "FAILED".
            If None the description of why the operation failed will be
            included in the result of the operation (see :attr:`Info.result`).
        :type  start_time: :class:`datetime.datetime`
        :param start_time: Time when the operation is started.
            This attribute is optional and it is only relevant when the value
            of ``status`` is one of :attr:`Status.RUNNING`,
            :attr:`Status.BLOCKED`, :attr:`Status.SUCCEEDED`, or
            :attr:`Status.FAILED`.
        :type  end_time: :class:`datetime.datetime`
        :param end_time: Time when the operation is completed.
            This attribute is optional and it is only relevant when the value
            of ``status`` is one of :attr:`Status.SUCCEEDED` or
            :attr:`Status.FAILED`.
        :type  user: :class:`str` or ``None``
        :param user: Name of the user who performed the operation.
            This attribute will be None if the operation is performed by the
            system.
        """
        self.progress = progress
        self.result = result
        self.description = description
        self.service = service
        self.operation = operation
        self.parent = parent
        self.target = target
        self.status = status
        self.cancelable = cancelable
        self.error = error
        self.start_time = start_time
        self.end_time = end_time
        self.user = user
        VapiStruct.__init__(self)
    class FailureAction(VapiStruct):
        """
        The ``Effective.FailureAction`` class contains attributes that describe the
        actions to be taken when entering maintenance mode fails on a single host
        within the cluster.

        .. tip::
            The arguments are used to initialize data attributes with the same
            names.
        """

        _validator_list = [
            UnionValidator(
                'action', {
                    'RETRY': [('retry_delay', True), ('retry_count', True)],
                    'FAIL': [],
                }),
        ]

        def __init__(
            self,
            action=None,
            retry_delay=None,
            retry_count=None,
        ):
            """
            :type  action: :class:`Effective.FailureAction.Action`
            :param action: What action (FAIL, RETRY) is to be taken if entering maintenance
                mode fails on a single host within the cluster.
            :type  retry_delay: :class:`long`
            :param retry_delay: Time to wait to retry the failed operation in seconds.
                This attribute is optional and it is only relevant when the value
                of ``action`` is :attr:`Effective.FailureAction.Action.RETRY`.
            :type  retry_count: :class:`long`
            :param retry_count: Number of times to retry the failed operation.
                This attribute is optional and it is only relevant when the value
                of ``action`` is :attr:`Effective.FailureAction.Action.RETRY`.
            """
            self.action = action
            self.retry_delay = retry_delay
            self.retry_count = retry_count
            VapiStruct.__init__(self)

        class Action(Enum):
            """
            The ``Effective.FailureAction.Action`` class defines the actions to be
            taken when entering maintenance mode fails on a single host within the
            cluster.

            .. note::
                This class represents an enumerated type in the interface language
                definition. The class contains class attributes which represent the
                values in the current version of the enumerated type. Newer versions of
                the enumerated type may contain new values. To use new values of the
                enumerated type in communication with a server that supports the newer
                version of the API, you instantiate this class. See :ref:`enumerated
                type description page <enumeration_description>`.
            """
            FAIL = None
            """
            Fail the apply method

            """
            RETRY = None
            """
            Retry the task Apply.FailureAction#retryCount number of times on the failed
            host after Apply.FailureAction#retryDelay.

            """
            def __init__(self, string):
                """
                :type  string: :class:`str`
                :param string: String value for the :class:`Action` instance.
                """
                Enum.__init__(string)

        Action._set_values([
            Action('FAIL'),
            Action('RETRY'),
        ])
        Action._set_binding_type(
            type.EnumType(
                'com.vmware.esx.settings.defaults.clusters.policies.apply.effective.failure_action.action',
                Action))