cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1562
Views
0
Helpful
6
Replies

UCSD REST API UCS_ADD_VNIC_TEMPLATE only works with default vlan

Sean Chandler
Cisco Employee
Cisco Employee

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

1 Accepted Solution

Accepted Solutions

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)>

View solution in original post

6 Replies 6

Orf Gelbrich
Cisco Employee
Cisco Employee

Does the vlan have to be in UCSM before you can create and use it in a template?

Yes. In the api browser you get a drop down list of existing vlans. The example I posted used already created ones.

I would open up a TAC ticket. I don’t have an answer for you unfortunately.

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

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)>

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

Review Cisco Networking for a $25 gift card

Cisco UCS X-Series Energy Efficiency Offer