Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Automate Port-profile creation on 1000v

Hi ,

i am trying to automate creating vlans and port-profile as a part of out automation.

i am trying to use curl on a linux machine but when i try to use PUT i am unable to create it. Being a Server guy all this is new to me. Any help will be appreciated or any documentation might help too

Using this i am able to get port-profile in an xml format

curl -v -X GET https://10.10.xx.xxx/api/vc/port-profile -H "Accept:application/json" -u "admin:xxxx" -d "" --insecure -3

but i when i try POST or PUT i get error

curl -v -k -u admin:admin -X POST 10.24.xxx.xxx/api/vc/port-profile -d '{"name":"profile1"}' --insecure -3

> Accept: */*

> Content-Length: 19

> Content-Type: application/x-www-form-urlencoded

> {"name":"profile1"}HTTP/1.1 500 Internal Error

< Date: Sat, 30 Nov 2013 01:37:32 GMT

< Content-Type: text/plain

< Content-Length: 46

< Connection: close

PortProfiles modification is not implemented.

* Closing connection #0

or this

curl -v -k -u admin:MSTRcloud1 -X PUT https://10.24.228.101/api/vc/port-profile -d '{"name":"profile1"}'

> {"name":"profile1"}HTTP/1.1 501 Method Not Supported

< Date: Sat, 30 Nov 2013 01:37:05 GMT

< Content-Type: text/plain

< Content-Length: 30

< Connection: close

Method "PUT" is not supported

Closing connection #0

* SSLv3, TLS alert, Client hello (1):

Thanks

-Shreyas

Everyone's tags (2)
383
Views
0
Helpful
0
Replies
CreatePlease login to create content