addIpRange()

SubscriptionIpRange addIpRange(string usn, IpRange ipRange)

This method allocates a non-managed IP range reservation to a subscription. Note that other subscriptions can be allocated the same IP address and Smile will not generate a fault message.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to which the IP range reservation is added.
ipRange
Format: IpRange XML
Purpose: Defines the IP address range to be allocated to the subscription.

Example: An IpRange XML document

This example shows an IpRange XML document.

The following elements need to be provided:
<FromAddress>
Textual representation of the lowest-numbered address of the IP range. The FromAddress parameter must be numerically lower than the ToAddress.
<ToAddress>
Textual representation of the highest-numbered address of the IP range.
Both address strings must be in one of the following formats:
  • A dotted-decimal numeric IPv4 address, as per RFC 790.
  • A colon-interspersed hexadecimal IPv6 address, as per RFC 2373.
Note: Both elements must belong to the same IP address protocol; it is not valid to use the embedded-IPv4 address feature of IPv6 as described in section 2.5.4 of RFC 2373 if the other argument is an IPv4 address.
No check is made to establish if the IP range is already partially or wholly allocated to the same or another subscription, or if the IP range covers reserved or otherwise unusable addresses, such as loopback, private, broadcast or multicast addresses.
<IpRange xmlns="http://xml.inomial.com/smile/2.xsd">
  <FromAddress>192.168.212.24</FromAddress>
  <ToAddress>192.168.212.27</ToAddress>
</IpRange>

Results

This method returns a SubscriptionIpRange XML document confirming the new allocation. The return result includes a distinct <SubscriptionIpRangeId> UUID string that identifies the IP range reservation. This UUID is required if the removeIpRange() method is later used to deallocate this reservation.

Smile emits the SubscriptionIpRangesUpdated message after the subscription is updated.

Example: A returned SubscriptionIpRange XML document

This example shows a SubscriptionIpRange XML document.

<SubscriptionIpRange xmlns="http://xml.inomial.com/smile/2.xsd">
  <SubscriptionIpRangeId>2B1DB0AE-242F-4E95-BF19-0FD61FF8485D</SubscriptionIpRangeId>
  <FromAddress>192.168.212.24</FromAddress>
  <ToAddress>192.168.212.27</ToAddress>
</SubscriptionIpRange>

Faults

InvalidRequestException

This fault is returned when the FromAddress or ToAddress elements do not comply with IP address specifications or are malformed.

NoSuchItemException

This fault is returned when the subscription does not exist.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.AddIpRange usn filename
usn
Purpose: Specifies the USN of the subscription to which the IP range reservation is added.
filename
Purpose: Defines the filename of the IpRange XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.