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 provides information about the Cisco Nexus 1000V OpenStack application programming interface (API) functions. The Cisco Nexus 1000V resource name is generic across all hypervisors. The functions that support write (create, update, and delete) operations are explicitly marked as writeable. All others are read-only functions.
The chapter contains the following topics:
cisco-policy-profile-list
Retrieves the list of policy profiles from a Cisco Nexus 1000V switch.
Request
JSON
application/json
GET /v2.0/policy_profiles.json
python-neutronclient
{ "date": "Fri, 13 Sep 2013 00:29:06 GMT", "status": "200", "content-length": "84", "content-type": "application/json; charset=UTF-8", "content-location": "http://172.23.180.45:9696/v2.0/policy_profiles.json" } { "policy_profiles": [ { "id": "452788f5-109d-4963-9153-1c5b181c8a0d", "name": "pp1" } ] }
Property |
Writeable or Readable |
---|---|
content-location |
Readable |
id |
Readable |
name |
Readable |
cisco-policy-profile-show
Retrieves information about a policy profile from a Cisco Nexus 1000V switch.
Request
JSON
application/json
GET /v2.0/policy_profiles/452788f5-109d-4963-9153-1c5b181c8a0d.json
Note | Retrieve the policy profile ID as shown in Get the List of Policy Profiles, specifying the profile name in the command line. For example: GET /v2.0/policy_profiles.json?fields=id&name=pp1. |
python-neutronclient
{ "date": "Fri, 13 Sep 2013 00:33:32 GMT", "status": "200", "content-length": "81", "content-type": "application/json; charset=UTF-8", "content-location": "http://172.23.180.45:9696/v2.0/policy_profiles/452788f5-109d-4963-9153-1c5b181c8a0d.json" } { "policy_profile": { "id": "452788f5-109d-4963-9153-1c5b181c8a0d", "name": "pp1" } }
Property | Writeable or Readable |
---|---|
content-location | Readable |
id | Readable |
name | Readable |
cisco-network-profile-create
Creates a network profile on a Cisco Nexus 1000V switch.
Request
JSON
application/json
POST /v2.0/network_profiles.json
python-neutronclient
{ "network_profile": { "segment_range": "100-200", "segment_type": "vlan", "physical_network": "physnet1", "name": "VlanNetProf" } } { "date": "Fri, 13 Sep 2013 00:57:15 GMT", "status": "201", "content-length": "220", "content-type": "application/json; charset=UTF-8" } { "network_profile": { "segment_range": "100-200", "segment_type": "vlan", "name": "VlanNetProf", "sub_type": null, "physical_network": "physnet1", "id": "58f722ca-489c-4abf-b74f-7bcc2e988d89", "multicast_ip_range": null } }
Property |
Writeable or Readable |
---|---|
segment_range |
Writeable |
segment_type |
Writeable |
name |
Writeable |
sub_type |
Writeable |
physical_network |
Writeable |
id |
Readable |
multicast_ip_range |
Writeable |
cisco-network-profile-list
Retrieves a list of network profiles from a Cisco Nexus 1000V switch.
Request
JSON
application/json
GET /v2.0/network_profiles.json
python-neutronclient
{ "date": "Fri, 13 Sep 2013 00:59:07 GMT", "status": "200", "content-length": "223", "content-type": "application/json; charset=UTF-8", "content-location": "http://172.23.180.45:9696/v2.0/network_profiles.json" } { "network_profiles": [ { "segment_range": "100-200", "segment_type": "vlan", "name": "VlanNetProf", "sub_type": null, "physical_network": "physnet1", "id": "58f722ca-489c-4abf-b74f-7bcc2e988d89", "multicast_ip_range": null } ] }
Property |
Writeable or Readable |
---|---|
content-location |
Readable |
segment_range |
Readable |
segment_type |
Readable |
name |
Readable |
sub_type |
Readable |
physical_network |
Readable |
id |
Readable |
multicast_ip_range |
Readable |
cisco-network-profile-show
Gets information about a network profile on a Cisco Nexus 1000V switch.
Request
JSON
application/json
GET /v2.0/network_profiles/58f722ca-489c-4abf-b74f-7bcc2e988d89.json
Note | Retrieve the network profile ID as shown in Get a List of Network Profiles, specifying the profile name in the command line. For example: GET /v2.0/network_profiles.json?fields=id&name=VlanNetProf. |
python-neutronclient
{ "date": "Fri, 13 Sep 2013 01:00:03 GMT", "status": "200", "content-length": "220", "content-type": "application/json; charset=UTF-8", "content-location": "http://172.23.180.45:9696/v2.0/network_profiles/58f722ca-489c-4abf-b74f-7bcc2e988d89.json" } { "network_profile": { "segment_range": "100-200", "segment_type": "vlan", "name": "VlanNetProf", "sub_type": null, "physical_network": "physnet1", "id": "58f722ca-489c-4abf-b74f-7bcc2e988d89", "multicast_ip_range": null } }
Property |
Writeable or Readable |
---|---|
content-location |
Readable |
segment_range |
Readable |
segment_type |
Readable |
name |
Readable |
sub_type |
Readable |
physical_network |
Readable |
id |
Readable |
multicast_ip_range |
Readable |
cisco-network-profile-update
Updates a network profile on a Cisco Nexus 1000V switch.
Request
JSON
application/json
PUT /v2.0/network_profiles/27d1d0a0-f4fa-462a-977f-4a92cd206616.json
Note | Retrieve the network profile ID as shown in Get a List of Network Profiles, specifying the profile name in the command line. For example: GET /v2.0/network_profiles.json?fields=id&name=vmnp2. |
python-neutronclient
{ "network_profile": { "name": "vmnp2" } } { "date": " Mon, 28 Oct 2013 14:56:29 GMT", "status": "200", "content-length": "208", "content-type": "application/json; charset=UTF-8" } { "network_profile": { "segment_range": "700-705", "segment_type": "vlan", "name": "VlanNetProf", "sub_type": null, "physical_network": "p1", "id": "58f722ca-489c-4abf-b74f-7bcc2e988d89", "multicast_ip_range": null } }
Property |
Writeable or Readable |
---|---|
segment_range |
Writeable |
segment_type |
Readable |
name |
Writeable |
sub_type |
Readable |
physical_network |
Readable |
id |
Readable |
multicast_ip_range |
Writeable |
cisco-network-profile-delete
Deletes a network profile from a Cisco Nexus 1000V switch.
Request
JSON
application/json
DELETE /v2.0/network_profiles/58f722ca-489c-4abf-b74f-7bcc2e988d89.json
Note | Retrieve the network profile ID as shown in Get a List of Network Profiles, specifying the profile name in the command line. For example: GET /v2.0/network_profiles.json?fields=id&name=VlanNetProf. |
python-neutronclient
{ "date": "Fri, 13 Sep 2013 01:02:01 GMT", "status": "204", "content-length": "0" }
Property |
Writeable or Readable |
---|---|
content-length |
Writeable |
net-create
Creates a network on a Cisco Nexus 1000V switch.
Request
JSON
application/json
POST /v2.0/networks.json
python-neutronclient
{ "network": { "n1kv:profile_id": "89b77e10-d363-4ee7-81b8-3e3e9ced5b08", "name": "VlanNet1", "admin_state_up": true } } { "date": "Fri, 13 Sep 2013 01:05:57 GMT", "status": "201", "content-length": "396", "content-type": "application/json; charset=UTF-8" } { "network": { "status": "ACTIVE", "subnets": [], "name": "VlanNet1", "provider:physical_network": "physnet1", "admin_state_up": true, "tenant_id": "4e56ea94b54442bab13dafcec9f52ebe", "provider:network_type": "vlan", "router:external": false, "n1kv:profile_id": "89b77e10-d363-4ee7-81b8-3e3e9ced5b08", "shared": false, "id": "036a0a93-d7ef-4920-8ea1-bfe813aa21f4", "provider:segmentation_id": 100 } }
Property |
Writeable or Readable |
---|---|
status |
Writeable |
subnets |
Writeable |
name |
Writeable |
provider:physical_network |
Writeable |
admin_state_up |
Writeable |
tenant_id |
Writeable |
provider:network_type |
Writeable |
router:external |
Writeable |
n1kv:profile_id |
Writeable |
shared |
Writeable |
id |
Readable |
provider:segmentation_id |
Writeable |
port-create
Creates a port on a Cisco Nexus 1000V switch.
Request
JSON
application/json
GET /v2.0/networks.json?fields=id&name=VlanNet1
python-neutronclient
{ "date": "Fri, 13 Sep 2013 01:10:14 GMT", "status": "200", "content-length": "62", "content-type": "application/json; charset=UTF-8", "content-location": "http://172.23.180.45:9696/v2.0/networks.json?fields=id&name=VlanNet1" } { "networks": [ { "id": "036a0a93-d7ef-4920-8ea1-bfe813aa21f4" } ] }
Property |
Writeable or Readable |
---|---|
content-location |
Writeable |
id |
Writeable |
Request
JSON
application/json
POST /v2.0/ports.json
python-neutronclient
{ "port": { "network_id": "036a0a93-d7ef-4920-8ea1-bfe813aa21f4", "n1kv:profile_id": "452788f5-109d-4963-9153-1c5b181c8a0d", "admin_state_up": true } } { "date": "Fri, 13 Sep 2013 01:10:14 GMT", "status": "201", "content-length": "472", "content-type": "application/json; charset=UTF-8" } { "port": { "status": "ACTIVE", "name": "", "admin_state_up": true, "network_id": "036a0a93-d7ef-4920-8ea1-bfe813aa21f4", "tenant_id": "4e56ea94b54442bab13dafcec9f52ebe", "binding:vif_type": "ovs", "device_owner": "", "n1kv:profile_id": "452788f5-109d-4963-9153-1c5b181c8a0d", "mac_address": "fa:16:3e:0a:b8:ca", "fixed_ips": [ { "subnet_id": "9244aacc-8d0c-4fbd-8811-6f023cf8288a", "ip_address": "10.10.10.3" } ], "id": "e94ad622-eda7-4030-83dd-303bff7a557a", "device_id": "" } }
Property |
Writeable or Readable |
---|---|
name |
Writeable |
admin_state_up |
Writeable |
network_id |
Writeable |
tenant_id |
Writeable |
binding:vif_type |
Writeable |
device_owner |
Writeable |
n1kv:profile_id |
Writeable |
mac_address |
Writeable |
subnet_id |
Writeable |
ip_address |
Writeable |
id |
Readable |
device_id |
Writeable |