# Managed Object - SrmInventoryMapping

Property of
  SrmServiceInstanceContent
See also
  SrmInventoryMappingFolderMapping, SrmInventoryMappingNetworkMapping, SrmInventoryMappingResourcePoolMapping, SrmInventoryMappingTestNetworkMapping
Since
  SRM API 3.0

## Managed Object Description

The InventoryMapping managed object is the singleton object which provides access to the inventory mapping functionality of the Site Recovery Manager.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
AddFolderMapping, AddNetworkMapping, AddResourcePoolMapping, AddTestNetworkMapping, GetFolderMappings, GetNetworkMappings, GetResourcePoolMappings, GetTestNetworkMappings, RemoveFolderMapping, RemoveNetworkMapping, RemoveResourcePoolMapping, RemoveTestNetworkMapping

# AddFolderMapping

Creates a new folder mapping. The folders on the primary and secondary sites must exist.

This method requires Resource.com.vmware.vcDr.RecoveryUse on the {@code secondaryFolder}.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryFolder P | vim.Folder | The folder on the protection site (must be local) Since SRM API 3.0
secondaryFolder P | vim.Folder | The folder on the recovery site (must be remote) Since SRM API 3.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultInvalidPrimaryFolder | Thrown if {@code primaryFolder} cannot have VMs as a child type
SrmFaultInvalidSecondaryFolder | Thrown if {@code secondaryFolder} cannot have VMs as a child type
SrmFaultNotAuthenticated | Thrown if the session is not authenticated
SrmFaultUnknownPrimaryFolder | Thrown if {@code primaryFolder} cannot be found on the local site
SrmFaultUnknownSecondaryFolder | Thrown if {@code secondaryFolder} cannot be found on the remote site

Events

Type
None

# AddNetworkMapping

Creates a new network mapping. The networks on the primary and secondary sites must exist.

This method requires Resource.com.vmware.vcDr.RecoveryUse on the {@code secondaryNetwork}.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryNetwork P | vim.Network | The network on the protection site (must be local) Since SRM API 3.0
secondaryNetwork P | vim.Network | The network on the recovery site (must be remote) Since SRM API 3.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultInvalidPrimaryNetwork | Thrown if {@code primaryNetwork} is not a supported network type (e.g. DVPortgroup)
SrmFaultInvalidSecondaryNetwork | Thrown if {@code secondaryNetwork} is not a supported network type (e.g. DVPortgroup)
SrmFaultNotAuthenticated | Thrown if the session is not authenticated
SrmFaultUnknownPrimaryNetwork | Thrown if no such network exists on the local site
SrmFaultUnknownSecondaryNetwork | Thrown if no such network exists on the remote site

Events

Type
None

# AddResourcePoolMapping

Creates a new resource pool mapping. The resource pools on the primary and secondary sites must exist.

This method requires Resource.com.vmware.vcDr.RecoveryUse on {@code secondaryPool}.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryPool P | vim.ResourcePool | The resource pool on the protection site (must be local) Since SRM API 3.0
secondaryPool P | vim.ResourcePool | The resource pool on the recovery site (must be remote) Since SRM API 3.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultNotAuthenticated | Thrown if the session is not authenticated
SrmFaultUnknownPrimaryResourcePool | Thrown if no such resource pool exists on the local site
SrmFaultUnknownSecondaryResourcePool | Thrown if no such resource pool exists on the remote site

Events

Type
None

# AddTestNetworkMapping

Creates a new test network mapping. Both networks must exist.

This method requires Resource.com.vmware.vcDr.RecoveryUse on {@code secondaryNetwork} and {@code destinationTestNetwork}

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
secondaryNetwork P | vim.Network | The network on the recovery site (must be remote) Since SRM API 5.0
destinationTestNetwork P | vim.Network | The test network on the recovery site (must be remote) Since SRM API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultInvalidSecondaryNetwork | Thrown if {@code secondaryNetwork} is not a supported network type (e.g. DVPortgroup)
SrmFaultRemoteSiteNotAuthenticated | Thrown if the remote site is not authenticated
SrmFaultUnknownSecondaryNetwork | Thrown if no such network exists on the remote site for secondaryNetwork or destinationTestNetwork

Events

Type
None

# GetFolderMappings

Returns an array of the folder mappings for this inventory mapper. If one of the mappings does not have a secondary object it means that the user does not have enough permissions to see that object on the secondary VC.

Required Privileges
  System.View
Since
  SRM API 9.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.

Return Value

Type | Description
--- | ---
SrmInventoryMappingFolderMapping[] | The folder mappings.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetNetworkMappings

Returns an array of the network mappings for this inventory mapper. If one of the mappings does not have a secondary object it means that the user does not have enough permissions to see that object on the secondary VC.

Required Privileges
  System.View
Since
  SRM API 9.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.

Return Value

Type | Description
--- | ---
SrmInventoryMappingNetworkMapping[] | The network mappings.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetResourcePoolMappings

Returns an array of the resource pool mappings for this inventory mapper. If one of the mappings does not have a secondary object it means that the user does not have enough permissions to see that object on the secondary VC.

Required Privileges
  System.View
Since
  SRM API 9.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.

Return Value

Type | Description
--- | ---
SrmInventoryMappingResourcePoolMapping[] | The resource pool mappings.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetTestNetworkMappings

Returns an array of the test network mappings for this inventory mapper.

Required Privileges
  System.View
Since
  SRM API 9.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.

Return Value

Type | Description
--- | ---
SrmInventoryMappingTestNetworkMapping[] | The test network mappings.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RemoveFolderMapping

Removes a folder mapping. This method does not check if the folders referenced by the mapping are still on the primary or secondary sites. This method can be used to remove mappings which are "broken" because the folders it refers to have been deleted.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryFolder P | vim.Folder | The primary site folder whose mapping is to be removed Since SRM API 3.0

P Required privilege: primaryFolder

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RemoveNetworkMapping

Removes a network mapping. This method does not check if the networks referenced by the mapping are still on the primary or secondary sites. This method can be used to remove mappings which are "broken" because the networks it refers to have been deleted.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryNetwork P | vim.Network | The primary site network whose mapping is to be removed Since SRM API 3.0

P Required privilege: primaryNetwork

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RemoveResourcePoolMapping

Removes a resource pool mapping. This method does not check if the pools referenced by the mapping are still on the primary or secondary sites. This method can be used to remove mappings which are "broken" because the pools it refers to have been deleted.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
primaryPool P | vim.ResourcePool | The primary site resource pool whose mapping is to be removed Since SRM API 3.0

P Required privilege: primaryPool

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RemoveTestNetworkMapping

Removes a test network mapping. This method does not check to see if the networks referenced by the mapping are still on the secondary sites. This method can be used to remove mappings which are "broken" because the networks it refers to have been deleted.

Required Privileges
  VcDr.InventoryMapper.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmInventoryMapping used to make the method call.
secondaryNetwork P | vim.Network | The secondary site network whose mapping is to be removed Since SRM API 5.0

P Required privilege: secondaryNetwork

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None