设为首页 收藏本站
查看: 606|回复: 0

[经验分享] VMware vShield REST的API

[复制链接]

尚未签到

发表于 2018-6-6 13:41:36 | 显示全部楼层 |阅读模式
  我的一个同事问我有关的vShieldAPI,并指出我到vShieldAPI编程指南。当然,我已经听说过的vShield很多次,但都没有尝试过了,更不用说它的API。但是,这并不意味着我不能阅读需求。事实上,这样的问题促使我去学习更多超越vSphereAPI的。因此,保持您的问题,如果你有一个。
  Here is what I found out after reading the programming guide. I have to admit I haven’t written any code connecting to a vShield test-bed, so I just share some basics of the API. Overall I found it’s similar to the vCloud API that I had worked with before in format and protocol.
  Somehow the API does not, but I think should, have an explicit version number. Reading further, I found the URL like the following and am convinced that API version is 1.0.
POST <vshield_manager-uri>/api/1.0/global/config  What Products It Manages?
  According to the guide, the API manages four products: vShield manager 4.1, vShield App 1.0, vShield Edge 1.0, and vShield Endpoint 1.0. All of them are in the vShield security product family.
  If you have been reading my blog, you should be getting tired of me saying that an API is just a “view” of the product it interfaces with the MVC (Model-View-Controller) metaphor. The corollary is that you’d better know a product before trying its API. Here are vShield Administrative Guide and vShield Quick Start Guide if you are not yet familiar with the products.
  On the other hand, you can deepen your understand of a product by reading its APIs. The GUI of a product does not nearly reveal as much as its API does.
  What You Can Do?
  The vShield API is based REST with about 100 URLs defined. Each URL represents an operation with a vShield server. By saying operation, I don’t necessarily mean changing things on server side. It can be just retrieving information from a server.
  As with a typical REST API, you will need to login the system with HTTP basic authorization. After that you can issue any URL with or without additional information. Although you can manage 4 different products with the API, the URL you connect to is always the vShield Manager.
  Because the vShield closely relates to vSphere, quite some of the operations especially provisioning part requires MOR values of managed objects like datastore, network group, etc. You can grab them using VI Java API.
  While reading the API guide, you may be buried with these URLs and in particular XML schemas, which seems to me a big drawback of using REST by developers. Next section is a high level overview of things you can do with the API. While browsing them, I was a little surprised to know vShield Edge supports load balancer feature.
  List of Operations With the API
  vShield Manager Management (4)

  •   Synchronize the vShield Manager with vCenter Server and DNS
  •   Retrieving Tech Support Logs
  •   Get the vShield Manager Technical Support Log File Path
  •   Get the vShield Edge Technical Support Log File Path
  ESX Host Preparation for vShield App, Endpoint, and Isolation (4)

  •   Install the Licenses for vShield Edge, vShield App, and vShield Endpoint
  •   Install vShield App, vShield Endpoint, and Port Group Isolation Services on an ESX Host
  •   Get the Installation Status of vShield Services on an ESX Host
  •   Uninstalling vShield Services from an ESX Host
  vNetwork Preparation and vShield Edge Installation (7)

  •   Enabling Port Group Isolation
  •   Enable Port Group Isolation on a vDS
  •   Get the Port Group Isolation Debug Statistics from an ESX Host
  •   Disable Port Group Isolation on a vDS
  •   Installing a vShield Edge
  •   Get the Install Parameters of a vShield Edge
  •   Uninstall a vShield Edge
  vShield Edge Management (64)

  •   Force a vShield Edge to Synchronize with the vShield Manager
  •   Manage CLI Credentials on a vShield Edge
  •   Managing DHCP (8)
  •   Get the DHCP Server Status
  •   Start, Stop, or Restart the DHCP Service
  •   Post a DHCP Configuration
  •   Get the Configuration for All DHCP Hosts and Pools
  •   Get Timestamps of Last 10 DHCP Configurations
  •   Get a DHCP Configuration by Timestamp
      Revert to a DHCP Configuration by Timestamp
      Delete the DHCP Configuration on a vShield Edge 29
  •   Managing NAT (12)
  •   Managing SNAT Rules (6)
  •   Get the SNAT Rule Set
  •   Post an SNAT Rule Set
  •   Get Timestamps of Last 10 SNAT Rule Configurations for a vShield Edge
  •   Get SNAT Configuration by Snapshot Timestamp
  •   Revert to an SNAT Configuration by Snapshot Timestamp
  •   Delete All SNAT Rules on a vShield Edge
  •   Managing DNAT Rules (6)
  •   Get the DNAT Rule Set
  •   Post a DNAT Rule Set
  •   Get Timestamps of Last 10 DNAT Rule Configurations for a vShield Edge
  •   Get DNAT Configuration by Snapshot Timestamp
  •   Revert to an DNAT Configuration by Snapshot Timestamp
  •   Delete All DNAT Rules
  •   Configuring the vShield Edge Firewall (9)
  •   Get the Firewall Rule Set for a vShield Edge
  •   Post a Firewall Rule Set
  •   Get the Status of the Default Policy for a vShield Edge
  •   Change the Default Firewall Policy Action
  •   Get Details of a Specific Firewall Rule
  •   Get Timestamps of Last 10 Firewall Rule Sets for a vShield Edge
  •   Get Firewall Rule Set by Timestamp
  •   Revert to a Firewall Rule Set by Timestamp
  •   Delete All Firewall Rules on a vShield Edge
  •   Configuring ***s (15)
  •   Get the Status of *** Service
  •   Start or Stop the *** Service on a vShield Edge
  •   Configure *** Parameters on a vShield Edge
  •   Add a Remote Site
  •   Add Tunnels for a *** Site
  •   Get the Detailed IPSec Configurations for a Network
  •   Get the Detailed Configuration for a *** Site
  •   Get the Detailed Tunnel Configuration
  •   Delete a Tunnel for a *** Site
  •   Delete a Remote Site
  •   Get the Current *** Configuration on a vShield Edge
  •   Get Timestamps of Last 10 *** Configurations
  •   Get a *** Configuration by Timestamp
  •   Revert to a *** Configuration by Timestamp
  •   Delete the *** Configuration on a vShield Edge
  •   Load Balancer (9)
  •   Get the Status of Load Balancer Service on a vShield Edge
      Start or Stop the Load Balancer Service on a vShield Edge
      Add a Listener for Load Balancing Service
      Get the Current Load Balancer Configuration on a vShield Edge
      Get the Configuration of a Specific Load Balancing Server
      Get Timestamps of Last 10 Load Balancer Configurations
      Get a Load Balancer Configuration by Timestamp
      Revert to a Load Balancer Configuration by Timestamp
      Delete the Load Balancer Configuration on a vShield Edge
      Managing the MTU Threshold for a vShield Edge
      View Traffic Statistics
      Debug vShield Edge Services Using Service Statistics
  Managing the Connection to a Syslog Server (6)

  •   Post a Syslog Server Configuration
  •   Get the Current Syslog Server Configuration
  •   Get Timestamps of Last 10 Syslog Server Configurations
  •   Get a Syslog Server Configuration by Timestamp
  •   Revert to a Syslog Server Configuration by Timestamp
  •   Delete the Current Syslog Server Configuration
  vShield App Management (16)

  •   Configuring Firewall Rules for a vCenter Container
  •   View All Firewall Rules for a Container
  •   Post an App Firewall Rule Set for a Container
  •   View a List of Timestamps Identifying App Firewall Rule Set Changes
  •   View a Previous Firewall Rule Set by Timestamp
  •   Revert to a Previous Firewall Rule Set
  •   Delete All Firewall Rules under a Container
  •   Managing Security Groups
  •   Add a Security Group
  •   Add a Virtual Machine to a Security Group
  •   Get the List of All Security Groups under a Base Node
  •   Get the Details for a Single Security Group under a Base Node
  •   Get IP Addresses for the Virtual Machines in a Security Group
  •   Get the Properties from a Virtual Machine
  •   Delete a Virtual Machine from a Security Group
  •   Delete a Single Security Group
  •   Delete All Security Groups under a Base Node
  •   Configuring Syslog Service for a vShield App
  vShield Endpoint Management (5)

  •   Register an SVM with the vShield Endpoint Service on an ESX Host
  •   Retrieve SVM‐Specific Network Information
  •   Retrieve vShield Endpoint Service Status on an ESX Host
  •   Uninstalling the vShield Endpoint Service from an ESX Host
  •   Unregister an SVM from vShield Endpoint
  •   Uninstall vShield Endpoint from the vShield Manager
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-519360-1-1.html 上篇帖子: Vmware vSphere SDK兼容性 下篇帖子: VMware下Oracle Linux安装详解
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表