The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
Note | OpenStack supports configuring all of the core Neutron resources, such as the network, subnet, and port, by using the REST APIs. The Cisco plug-in for OpenStack supports all of these core resources and also the resources that Cisco added to support Nexus 1000v, such as cisco-network-profile and cisco-policy-profile. |
Accessing the core OpenStack resources through the REST APIs is thoroughly documented on the OpenStack Website. This document describes the resources that Cisco newly added or extended. The REST APIs can be accessed by using a Web browser or using the cURL tool.
Accessing the REST APIs for OpenStack is a two step process. You must authenticate with the Keystone service and obtain an authorization token. You use this token with the curl command to access the Neutron resources.
To authenticate with the Keystone service:
curl -k -X 'POST' -v http://Controller’s_public_IP:Keystone’s_public_port/v2.0/tokens \ -d '{"auth":{"passwordCredentials":{"username": "userName", "password":"password"}, \ "tenantId":"tenant-ID"}}' -H 'Content-type: application/json'
To request access to the Neutron resources:
curl -H "X-Auth-Token:Token" \ http://Controller's_public_port:neutron's_public_port/v2.0/networks
The following example authenticates with the Keystone service and fetches all of the networks configured on Neutron in JSON format:
$ curl -k -X 'POST' -v http://192.168.10.25:5000/v2.0/tokens -d \ '{"auth":{"passwordCredentials":{"username": "admin", "password":"pw1"}, \ "tenantId":"36c7867df9d24ab38fef45475a0a0c17"}}' -H 'Content-type: application/json' $ curl -H "X-Auth-Token: 5788dc57e14036c7867df9d24ab38fef45475a0" \ -X GET http://192.168.10.25:9696/v2.0/networks { "networks": [ {"status": "ACTIVE", "subnets": [], "name": "extnet", "provider:physical_network": "net1", "admin_state_up": true, "tenant_id": "36c7867df9d24ab38fef45475a0a0c17", "provider:network_type": "vlan", "router:external": true, "n1kv:profile_id": "cb027858-d3e7-4c73-a631-5788dc57e140", "shared": false, "id": "081e4573-2cf5-4abc-97a4-cb4860e642e4", "provider:segmentation_id": 14} ] }
Every OpenStack REST API function is associated with a resource name
To find the list of Cisco Nexus 1000V OpenStack resource names, use the following command:
curl -H "X-Auth-Token:Authorization_token" -X GET http://172.23.231.25:9696/v2.0/
You get the following output:
{ "resources": [ { "links": [{"href": "http://172.23.231.25:9696/v2.0/subnets", "rel": "self"}], "name": "subnet", "collection": "subnets" }, { "links": [{"href": "http://172.23.231.25:9696/v2.0/networks", "rel": "self"}], "name": "network", "collection": "networks" }, { "links": [{"href": "http://172.23.231.25:9696/v2.0/ports", "rel": "self"}], "name": "port", "collection": "ports" } ] }
Namespace |
Description |
---|---|
cisco-policy-profile-list |
Retrieves the list of policy profiles of a Cisco Nexus 1000V switch. |
cisco-policy-profile-show |
Retrieves information about a port profile of a Cisco Nexus 1000V switch. |
cisco-network-profile-create |
Creates a network profile on a Cisco Nexus 1000V switch. |
cisco-network-profile-list |
Retrieves a list of network profiles from a Cisco Nexus 1000V switch. |
cisco-network-profile-show |
Gets information about a network profile on a Cisco Nexus 1000V switch. |
cisco-network-profile-update |
Updates a network profile on a Cisco Nexus 1000V switch. |
cisco-network-profile-delete |
Deletes a network profile from a Cisco Nexus 1000V switch. |
net-create |
Creates a network on a Cisco Nexus 1000V switch. |
port-create |
Creates a port on a Cisco Nexus 1000V switch. |