Get The Dhcp Server Status; Start, Stop, Or Restart The Dhcp Service; Post A Dhcp Configuration - VMware VSHIELD APP 1.0 - API Programming Manual

Vshield api
Table of Contents

Advertisement

Get the DHCP Server Status

Example 5-3. Getting the Status of the DHCP Service on a vShield Edge
Request:
GET <vshield_manager-uri>/api/1.0/network/<portgroup-moid>/dhcp/service
Example:
GET /api/1.0/network/network-244/dhcp/service HTTP/1.1
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 10.112.196.213

Start, Stop, or Restart the DHCP Service

Example 5-4. Starting or Stopping the DHCP Service on a vShield Edge
Request:
PUT <vshield_manager-uri>/api/1.0/network/<portgroup-moid>/dhcp/action/
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-5. Adding IP Pool Ranges to a vShield Edge
Request:
POST <vshield_manager-uri>/api/1.0/network/<portgroup-moid>/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 />.
VMware, Inc.
{start | stop | restart}
Chapter 5 vShield Edge Management
27

Advertisement

Table of Contents
loading

Table of Contents