:param groups: Groups of the user who started the interposed operation. Would be
            empty if there is no authentication information.
        """
        self.service_id = service_id
        self.operation_id = operation_id
        self.operation_input = operation_input
        self.user = user
        self.groups = groups
        VapiStruct.__init__(self)


InvocationRequest._set_binding_type(type.StructType(
    'com.vmware.vapi.std.interposition.invocation_request', {
        'service_id': type.StringType(),
        'operation_id': type.StringType(),
        'operation_input': type.OpaqueType(),
        'user': type.OptionalType(type.ReferenceType(__name__, 'SecurityPrincipal')),
        'groups': type.ListType(type.ReferenceType(__name__, 'SecurityPrincipal')),
    },
    InvocationRequest,
    False,
    None))



class InvocationResult(VapiStruct):
    """
    Information about the result from an interposed operation invocation. All
    POST interposers will receive an instance of this structure.

    .. tip::
        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)


Info._set_binding_type(type.StructType(
    'com.vmware.cis.task.info', {
        'progress': type.OptionalType(type.ReferenceType(__name__, 'Progress')),
        'result': type.OptionalType(type.OpaqueType()),
        'description': type.ReferenceType('com.vmware.vapi.std_client', 'LocalizableMessage'),
        'service': type.IdType(resource_types='com.vmware.vapi.service'),
        'operation': type.IdType(resource_types='com.vmware.vapi.operation'),
        'parent': type.OptionalType(type.IdType()),
        'target': type.OptionalType(type.ReferenceType('com.vmware.vapi.std_client', 'DynamicID')),
        'status': type.ReferenceType(__name__, 'Status'),
        'cancelable': type.BooleanType(),
        'error': type.OptionalType(type.AnyErrorType()),
        'start_time': type.OptionalType(type.DateTimeType()),
        'end_time': type.OptionalType(type.DateTimeType()),
        'user': type.OptionalType(type.StringType()),
    },
    Info,
    False,
    None))
Exemplo n.º 3
0
        self.start_time = start_time
        self.end_time = end_time
        self.user = user
        VapiStruct.__init__(self)


TaskInfo._set_binding_type(
    type.StructType(
        'com.vmware.appliance.infraprofile.task_info', {
            'progress':
            type.OptionalType(
                type.ReferenceType('com.vmware.cis.task_client', 'Progress')),
            'notifications':
            type.OptionalType(type.ReferenceType(__name__, 'Notifications')),
            'result':
            type.OptionalType(type.OpaqueType()),
            'description':
            type.ReferenceType('com.vmware.vapi.std_client',
                               'LocalizableMessage'),
            'service':
            type.IdType(resource_types='com.vmware.vapi.service'),
            'operation':
            type.IdType(resource_types='com.vmware.vapi.operation'),
            'parent':
            type.OptionalType(type.IdType()),
            'target':
            type.OptionalType(
                type.ReferenceType('com.vmware.vapi.std_client', 'DynamicID')),
            'status':
            type.ReferenceType('com.vmware.cis.task_client', 'Status'),
            'cancelable':