Cable Plan

The following are the Cable Plan REST APIs:

Capture a Cable Plan

Resource Name

/cable-plans/discovery

Description

Extract a cable plan base on the switches discovered by DCNM.

https Method

GET

URL

https://dcnm-ip/rest/cable-plans/discovery

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-name

S

Name of the cable plan

Status Code

200

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Generate a Cable Plan

Resource Name

/cable-plans/poap

Description

Generate a cable plan base on the POAP switch definitions from DCNM

https Method

GET

URL

https://dcnm-ip/rest/cable-plans/poap

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-name

S

Name of the cable plan

Status Code

200

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Get a Cable Plan

Resource Name

/cable-plans

Description

Get a cable plan

https Method

GET

URL

https://dcnm-ip/rest/cable-plans

https://dcnm-ip/rest/cable-plans?detail=true

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan

O

By default returns cable-plan information, if “detail=true”, then will return CablePlan object.

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Save a Cable Plan

Resource Name

/cable-plans

Description

Save a cable plan into the DCNM database.

https Method

POST

URL

https://dcnm-ip/rest/cable-plans

Parameter

Parameter
Type
Description

cable-plan-object

O

Cable-plan-object including cable-plan-name, source-device, source-device-type, source-port, dest-device, dest-device-type, dest-port.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

 

 

 

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Delete a Cable Plan

Resource Name

/cable-plans

Description

Delete cable plan base on the POAP switch definitions from DCNM.

https Method

DELETE

URL

https://dcnm-ip/rest/cable-plans

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

 

 

 

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Get a Cable Plan From Device

Resource Name

/cable-plans/device-xml

Description

Get a cable plan from devices in XML

https Method

POST

URL

https://dcnm-ip/rest/cable-plans/device-xml

Parameter

Parameter
Type
Description

Ip-addresses

S

The Switch IP Address list which derives the cable plan.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-info

S

Cable plans in XML

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

View Cable Plan From Device

Resource Name

/cable-plans/device-raw

Description

Get cable plan from devices and return in raw format

https Method

POST

URL

https://dcnm-ip/rest/cable-plans/device-raw

Parameter

Parameter
Type
Description

Ip-addresses

S

The Switch IP Address list which derives the cable plan

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-info

S

Cable plans in raw format

Status Code

200

OK

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Import a Cable Plan

Resource Name

/cable-plans/import

Description

Returns Cable Plan object of imported cable plan file.

https Method

POST

URL

https://dcnm-ip/rest/cable-plans/import

Parameter

Parameter
Type
Description

cable-plan

S

You must provide a Name for the cable plan and the cable plan content in the payload.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-object

O

Cable plan object

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Export a Cable Plan

Resource Name

/cable-plans/xml

Description

Export a cable plan from DCNM in XML format

https Method

GET

URL

https://dcnm-ip/rest/cable-plans/xml

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-object

S

Name of the cable plan and content in XML format in the payload.

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Deploy a Cable Plan

Resource Name

/cable-plans/fabric

Description

Deploy a cable plan to all the spine and leaf devices

https Method

POST

URL

hhttps://dcnm-ip/rest/cable-plans/fabric

Parameter

Parameter
Type
Description

Ip-addresses

S

Switch IP address list that needs to be deployed.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

 

 

 

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

Revoke a Cable Plan

Resource Name

/cable-plans/revoke

Description

Revoke a cable plan from all the spine and leaf devices

https Method

POST

URL

https://dcnm-ip/rest/cable-plans/revoke

Parameter

Parameter
Type
Description

Ip-addresses

S

Switch IP address list that needs to be deployed.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

 

 

 

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error