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
- ipRange
- Format: IpRange XML
Example: An IpRange XML document
This example shows an IpRange XML document.
- <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.
- A dotted-decimal numeric IPv4 address, as per RFC 790.
- A colon-interspersed hexadecimal IPv6 address, as per RFC 2373.
<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
InvalidRequestExceptionThis fault is returned when the FromAddress or ToAddress elements do not comply with IP address specifications or are malformed.
NoSuchItemExceptionThis 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.