Class: Com::Vmware::Vapi::Metadata::Privilege::Source

Inherits:
VAPI::Bindings::VapiService
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb

Overview

The ``Com::Vmware::Vapi::Metadata::Privilege::Source`` class provides methods to manage the sources of privilege metadata information.


 The interface definition language infrastructure provides tools to generate various kinds of metadata in JSON format from the interface definition files and additional properties files. One of the generated files contains privilege information. The generated file can be registered as a source of metadata.  

 The privilege file contains all the data present in the interface definition files. Each privilege file contains data about one component element. When a privilege file is added as a source, each source contributes only one component element's metadata.  

 Privilege metadata can also be discovered from a remote server that supports the privilege metadata  classs  (see   :mod:`com.vmware.vapi.metadata.privilege`  ). Since multiple components can be registered with a single metadata server, when a remote server is registered as a source, that source can contribute more than one component.

Defined Under Namespace

Classes: CreateSpec, Info

Constant Summary

RESOURCE_TYPE =
'com.vmware.vapi.metadata.privilege.source'

Instance Method Summary (collapse)

Constructor Details

- (Source) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



381
382
383
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 381

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Void) create(source_id, spec)

Creates a new metadata source. Once the server validates the registration information of the metadata source, the privilege metadata is retrieved from the source. This populates elements in all the classs defined in :mod:`com.vmware.vapi.metadata.privilege` package .

Parameters:

Returns:

  • (Void)

Raises:



405
406
407
408
409
410
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 405

def create(source_id, spec)
    invoke_with_info(@@create_info, {
        'source_id' => source_id,
        'spec' => spec,
    })
end

- (Void) delete(source_id)

Deletes an existing privilege metadata source from the infrastructure.

Parameters:

  • source_id (String)

    Identifier of the metadata source.

Returns:

  • (Void)

Raises:



420
421
422
423
424
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 420

def delete(source_id)
    invoke_with_info(@@delete_info, {
        'source_id' => source_id,
    })
end

- (String) fingerprint(source_id = nil)

Returns the aggregate fingerprint of metadata from all the metadata sources or from a particular metadata source if ``source_id`` is specified.

Parameters:

  • source_id (String, nil) (defaults to: nil)

    Identifier of the metadata source. If unspecified, the fingerprint of all the metadata sources is returned.

Returns:

  • (String)

    Aggregate fingerprint of all the metadata sources or of a particular metadata source.

Raises:



475
476
477
478
479
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 475

def fingerprint(source_id=nil)
    invoke_with_info(@@fingerprint_info, {
        'source_id' => source_id,
    })
end

- (Com::Vmware::Vapi::Metadata::Privilege::Source::Info) get(source_id)

Retrieves information about the metadata source corresponding to ``source_id`` .

Parameters:

  • source_id (String)

    Identifier of the metadata source.

Returns:

Raises:



435
436
437
438
439
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 435

def get(source_id)
    invoke_with_info(@@get_info, {
        'source_id' => source_id,
    })
end

- (Array<String>) list

Returns the identifiers of the metadata sources currently registered with the infrastructure.

Returns:

  • (Array<String>)

    The list of identifiers for metadata sources currently registered.



446
447
448
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 446

def list()
    invoke_with_info(@@list_info)
end

- (Void) reload(source_id = nil)

Reloads the privilege metadata from all the metadata sources or of a particular metadata source if ``source_id`` is specified.

Parameters:

  • source_id (String, nil) (defaults to: nil)

    Identifier of the metadata source. If unspecified, all the metadata sources are reloaded.

Returns:

  • (Void)

Raises:



459
460
461
462
463
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 459

def reload(source_id=nil)
    invoke_with_info(@@reload_info, {
        'source_id' => source_id,
    })
end