# Managed Object - SrmIpSubnetMapper

Property of
  SrmServiceInstanceContent
See also
  SrmIPMapping, SrmIpSubnetMapperIPSubnetMapping
Since
  SRM API 9.0

## Managed Object Description

IpSubnetMapper is the component residing on the Recovery site and managing IP Subnet Mapping between Protection and Recovery site networks.

Properties

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

Methods

Methods defined in this Managed Object
AddIpMapping, GetIpSubnetMappings, RemoveIpMappings

# AddIpMapping

Associates an SrmIPMapping with an inventory-mapped protected site network. Must be called on secondary (recovery) site.

The protectedNetwork should be mapped to recoveryNetwork by #InventoryMapper.addNetworkMappings() for the IPMapping to be applied to VMs connected to recoveryNetwork during IP customization.

If an IPMapping had been already associated with the protectedNetwork then it gets replaced by the new IPMapping. Up to 1 IPMapping containing mupliple SubnetRule rules can be associated with any given protected site network at any time.

If the destination (recovery) network is associated with a Test Network on the recovery site then the ipMapping will be applied to the test network as well.

This method requires Resource.com.vmware.vcDr.RecoveryUse privilege on destinationNetwork.

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

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmIpSubnetMapper used to make the method call.
protectedNetwork P | vim.Network | the primary (protected) site network (must be remote) Since SRM API 9.0
recoveryNetwork P | vim.Network | the secondary (recovery) site network (must be local) Since SRM API 9.0
ipMapping P | SrmIPMapping | Since SRM API 9.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.
SrmFaultIpMappingFault | Thrown if problems found while validating IP subnet mapping rules.
SrmFaultRemoteSiteNotAuthenticated | Thrown if the session is not authenticated.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.
SrmFaultStringArgumentTooLong | Thrown if name(s) used for #ipMapping or a rule is too long.
SrmFaultUnknownPrimaryNetwork | Thrown if no such network exists on the primary (protected) site.
SrmFaultUnknownSecondaryNetwork | Thrown if no such network exists on the secondary (recovery) site.

Events

Type
None

# GetIpSubnetMappings

Returns an array of the IP subnet mappings for this IP Subnet Mapper.

Required Privileges
  System.View

Parameters

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

Return Value

Type | Description
--- | ---
SrmIpSubnetMapperIPSubnetMapping[] |

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

# RemoveIpMappings

Removes IPMapping-s from mapped primary (protected) site networks. Must be called on secondary (recovery) site.

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

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmIpSubnetMapper used to make the method call.
protectedNetworks* P | vim.Network[] | the primary (protected) site networks whose IPMapping is to be removed (must be remote) Since SRM API 9.0

*Need not be set P Required privilege: protectedNetworks

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.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None