Post A Dhcp Configuration; Get The Configuration For All Dhcp Hosts And Pools - VMware VSHIELD APP 1.0.0 UPDATE 1 - API Programming Manual

Vshield api
Hide thumbs Also See for VSHIELD APP 1.0.0 UPDATE 1 - API:
Table of Contents

Advertisement

vShield API Programming Guide
Example:
PUT /api/1.0/network/network-244/dhcp/action/start HTTP/1.1
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 10.112.196.213

Post a DHCP Configuration

You can add hosts and IP pools for DHCP service on a vShield Edge, The vShield Edge can allocate IP
addresses to protected virtual machines from configured IP pools.
The vShield Manager processes the posted XML file as a complete configuration for the specific vShield Edge.
The current configuration is replaced with this new configuration.
If you do not specify a value for the <leaseTime/> parameter, the default value of one day is used. A value of
infinite is supported.
Example 5-7. Adding IP Pool Ranges to a vShield Edge
Request:
POST <vshield_manager-uri>/api/1.0/network/<internal-portgroup-vc-moref-id>/dhcp/config
Rules:
DHCPConfigParams and its elements are optional
leaseTime can be infinite or number of seconds. If not specified, the default lease time is 1 day.
Logging is disabled by default. To enable logging, add a <log /> element within <DHCPConfig />.
Example:
POST /api/1.0/network/network-244/dhcp/config HTTP/1.1
content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 10.112.196.213
accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
content-length: 655
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><VShieldEdgeConfig><DHCPConfig><DHCPBinding><vmId>vm-70</vmId><interfaceId>1

Get the Configuration for All DHCP Hosts and Pools

You can retrieve the current DHCP configuration for a vShield Edge, including all configured hosts and IP
pools.
Example 5-8. Getting the Configuration of All DHCP Hosts and Pools
Request:
GET <vshield_manager-uri>/api/1.0/network/<internal-portgroup-vc-moref-id>/dhcp/config
26
</interfaceId><hostName>vmware</hostName><internalIPAddress>172.16.1.54
</internalIPAddress><DHCPConfigParams><domainName>vmware.com</domainName>
<primaryNameServer>10.112.192.1</primaryNameServer><secondaryNameServer>
10.112.192.2</secondaryNameServer><leaseTime>3000</leaseTime></DHCPConfigParams>
</DHCPBinding><DHCPPool><PoolRange><rangeStart>172.16.1.50</rangeStart>
<rangeEnd>172.16.1.53</rangeEnd></PoolRange><DHCPConfigParams><leaseTime>infinite
</leaseTime></DHCPConfigParams></DHCPPool></DHCPConfig></VShieldEdgeConfig>
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents