05-02-2018 01:38 PM - edited 03-01-2019 06:27 AM
Creating a vnic template appears to only like the default VLAN. Below is the XML and below that is the result:
Error while performing vNIC template add task.1802 : is not a permitted Vlan
Has anyone else experienced this issue? What am I missing here?
-s
POST: https://192.168.241.253/cloupia/api-v2/ucsVnicTemplate
<cuicOperationRequest>
<operationType>UCS_ADD_VNIC_TEMPLATE</operationType>
<payload>
<![CDATA[
<UcsAddvNICTemplate>
<name>test</name>
<descr></descr>
<!-- Accepts value from the list: ucsOrganizationIdentity-->
<org>admin;org-root</org>
<switchId>A</switchId>
<enableFailover>false</enableFailover>
<targetAdapter>true</targetAdapter>
<targetVM>false</targetVM>
<templType>initial-template</templType>
<!-- Accepts value from the list: ucsMultiVlanIdentity-->
<vlanIdentityList>admin;fabric/lan/net-1802</vlanIdentityList>
<nativeVlan>1802</nativeVlan>
<mtu>1500</mtu>
<!-- Accepts value from the list: ucsMacPoolIdentity-->
<identPoolName></identPoolName>
<qosPolicyName></qosPolicyName>
<nwCtrlPolicyName></nwCtrlPolicyName>
<pinToGroupName></pinToGroupName>
<statsPolicyName></statsPolicyName>
<connectionPolicy>Dynamic Policy</connectionPolicy>
<!-- Set this value only when connectionPolicy not equals to any of {usNIC Policy,VMQ Policy,,} -->
<dynVNICPolicy></dynVNICPolicy>
<!-- Set this value only when connectionPolicy not equals to any of {Dynamic Policy,VMQ Policy,,} -->
<ucNICPolicy></ucNICPolicy>
<!-- Set this value only when connectionPolicy not equals to any of {Dynamic Policy,usNIC Policy,,} -->
<vMQPolicy></vMQPolicy>
</UcsAddvNICTemplate>
]]>
</payload>
</cuicOperationRequest>
Returns:
<?xml version="1.0" ?>
<cuicOperationResponse>
<cuicOperationStatus>0</cuicOperationStatus>
<response>
<ucsOrg>
<accountName>admin</accountName>
<central>false</central>
<description/>
<parentOrgDn>org-root</parentOrgDn>
<accountName>admin</accountName>
<level>root</level>
<orgId>128</orgId>
<orgName>root</orgName>
<permAccess>yes</permAccess>
</ucsOrg>
</response>
</cuicOperationResponse>
<?xml version="1.0" ?>
<cuicOperationResponse>
<errorMessage>1802 : is not a permitted Vlan</errorMessage>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2018-05-02 20:34:04.129</TimeStamp>
<Severity>ERROR</Severity>
<Text>Error while performing vNIC template add task.1802 : is not a permitted Vlan</Text>
</Message>
</Log>
<operationStatus>3</operationStatus>
</cuicOperationResponse
Solved! Go to Solution.
05-03-2018 07:18 AM
In UCSD 6.6 there is now a native API task you could make a call directly to the endpoint and circumvent the call via UCSD to UCSM.
The API call has even a provision for roll back.
Send me a direct e-mail and I can send you a API task document (ogelbric@cisco.com)<mailto:ogelbric@cisco.com)>
05-02-2018 02:13 PM
Does the vlan have to be in UCSM before you can create and use it in a template?
05-02-2018 02:40 PM
Yes. In the api browser you get a drop down list of existing vlans. The example I posted used already created ones.
05-02-2018 03:02 PM
I would open up a TAC ticket. I don’t have an answer for you unfortunately.
05-03-2018 06:23 AM
Thanks, I may do that. It doesn’t seem that this interface is widely used given the general lack of info or examples I’ve found. Does this seem true to you as well? My guess is that custom workflows are created and driven by REST instead.
-s
05-03-2018 07:18 AM
In UCSD 6.6 there is now a native API task you could make a call directly to the endpoint and circumvent the call via UCSD to UCSM.
The API call has even a provision for roll back.
Send me a direct e-mail and I can send you a API task document (ogelbric@cisco.com)<mailto:ogelbric@cisco.com)>
05-03-2018 09:23 AM
Looks like in 6.6 this works correctly so I'll be sticking with that version. Also thanks for the suggestion as it looks like it has useful features as well
-s
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide