
vShield API Programming Guide
50 VMware, Inc.
</vshieldEdgeConfig>
6Forthedatapathtowork,youneedtochangethedefaultfirewallpolicytoallow,orpunchFirewallrules
toallowdatatrafficonVPNandinternalinterfaces
Operating vShield Edge
ThesetofAPIsinthissectionperformvShieldEdgediscoveryandoperations.
Get Details About Edge
YoucanretrievethedetailsofavShieldEdgeconfiguration.Thisshowstheinternalrulespunchedthrough
thevShieldEdgetomakeloadbalancingandVPNwork.
Example 5-34. Retrieve vShield Edge details
Request:
GET https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge/detailed
Thisreturnsthecurrentandinstall‐timehostId,dataStoreId,vmId,andotherdetailsthatgiveadministrators
insightintowhethertheEdgeVMgotvMotionedoraltered.
Request Sync or Upgrade
YoucansynchronizeorupgradevShieldEdge.
Example 5-35. Request an action from vShield Edge
Request:
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge?action=<actiontype>
The<...moref-id>referstosomenetworkentity.The<actiontype>canbeoneofthefollowing:
forcesync–forceEdgetosynchronizewiththelastgoodconfigurationinthevShieldManagerdatabase.
POST https://<vsm-ip>/api/2.0/networks/dvportgroup-63/edge?action=forcesync
upgrade–upgradetheEdgetothelatestversioniftheOVFisavailable.
POST https://<vsm-ip>/api/2.0/networks/dvportgroup-63/edge?action=upgrade
forceupgrade–upgradetothelatestavailableversion,creatingoneifanexistingEdgeisnotfound.
POST https://<vsm-ip>/api/2.0/networks/dvportgroup-63/edge?action=forceupgrade
Get IPsec Tunnel Statistics
YoucanretrievestatisticsabouttheIPsectunnel.
Example 5-36. Get IPsec statistics
Request:
GET https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge/statistics/ipsec
Get DHCP Statistics
YoucanretrieveDHCPleasestatistics,includingdetailsaboutleasedIPsfromtheconfiguredIPPools.
Komentarze do niniejszej Instrukcji