I create an IPset with vShield Manger API, but vShield reports fault http respone "405 Method Not Allowed" with the body info: Requet method 'POST' not supported . While both query and modify IPset API work correct. Why? the vshield_5.0_api.pdf is written as following:
Create an IPset on a Scope
You can create a new IPset on the specified scope.
Example 2-19. Create IPset on a scope
Request:
POST https://<vsm-ip>/api/2.0/services/ipset/scope/<scope-moref>
Request Body Example:
<ipset>
<objectId />
<type>
<typeName />
</type>
<description>
New Description
</description>
<name>TestIPSet2</name>
<revision>0</revision>
<objectTypeName />
<value>10.112.201.8-10.112.201.14</value>
</ipset>
Additional info: I want to create an IPset with scope-moref of portgroup id of vCenter.
Just remove the scope from the URL and it should work.
-- POST https://<vsm-ip>/api/2.0/services/ipset/scope/<scope-moref> to POST https://<vsm-ip>/api/2.0/services/ipset/<scope-moref>
Thank you response. I have check the vshield_41_api.pdf and don't find the create an IPset introduce. I think the IPset is added from the vShield 5.0.
Becuase the new feature is added recently, the vshield_50_api.pdf have not the xsd definite about the IPset.
Referenced api document, I can't create an IPset. But using the vShieldManger GUI, i can create an IPset successfully. Because https is used between vShield Plugin and vShieldManage, I can't grab the network traffic for analysis the Rest request sended by vshield plugin.
Just remove the scope from the URL and it should work.
-- POST https://<vsm-ip>/api/2.0/services/ipset/scope/<scope-moref> to POST https://<vsm-ip>/api/2.0/services/ipset/<scope-moref>