Home Guides API参考
Guides API参考 GitHub Airheads Developer Community Log In

Day 1 Tasks

In this section we will see some of the typical configuration tasks, an admin user would undergo on Day 1 of network operations.

How to create new nodes and assign new MDs to them

Step 1:For creating a new node-hierarchy, use configuration_node API.

API:POST /object/configuration_node
URL:https://:4343/v1/configuration/object/configuration_node?config_path=%2Fmd&UIDARUBA=xxxx

{ "node-path": "/md/New-Node" }

Step 2:After the node is created, use configuration_device API for adding new devices to a node

API:POST /object/configuration_device
URL:https://:4343/v1/configuration/object/configuration_device?config_path=%2Fmd&UIDARUBA=xxxx

{ "dev-model": "A7010","mac-address": "ff:ff:ff:ff:ff:ff", "config-path": "md/New-Node" }

How to set the controller discovery to static

Step 1:Use copy_provisioning_params API

API:POST /object/copy_provisioning_params
URL:https://:4343/v1/configuration/object/copy_provisioning_params?config_path=%2Fmd&UIDARUBA=xxxx

{ "ap-name": "" }

Step 2:Use read_bootinfo API

API:POST /object/read_bootinfo
URL:https://:4343/v1/configuration/object/read_bootinfo?config_path=%2Fmd&UIDARUBA=xxxx

{ "wired-mac": "ff:ff:ff:ff:ff:ff" }

Step 3:Use ap_prov API

API:POST /object/ap_prov
URL:https://:4343/v1/configuration/object/ap_prov?config_path=%2Fmd&UIDARUBA=xxxx

{ "master": { "master": "" } }

Step 4:Use ap_reprovision API

API:POST /object/ap_reprovision
URL:https://:4343/v1/configuration/object/ap_reprovision?config_path=%2Fmd&UIDARUBA=xxxx

{ "ap-name": "" }

How to track if Config push happened to all MDs after POST API in Mobility Conductor at a certain config path

Answer:200成功的HTTP代码由POST API请求返回,并不意味着将配置推到上述配置路径中的所有MDS。使用ShowCommand API(/V1/Configuration/ShowCommand)执行基于CLI的“ Show Switches”命令。基于配置ID和配置状态,我们可以知道配置是否与发布后的所有/必需的MD同步。所有MD的配置ID不管更改为特定MD,都将增加。

Step 1:Use showcommand API

API:GET /v1/configuration/showcommand
URL:https://:4343/v1/configuration/showcommand?UIDARUBA=xxxx&command=show+switches

None
{“所有交换机”:[{“ config ID”:“ 214”,“ config sync time(sec)”:“ 0”,“ configuration state”:“更新成功”,“ ip地址”:“ 1.1.124.1”,“ ipv6地址”:“无”,“位置”:“ building1.floor1”,“模型”:“ Arubamm-va”,“ name”:“ Aruba-Mm”,“ status”:“ status”:“ up”,“类型”“:“主”,“版本”:“ 8.5.0.0_70258”},{“ config ID”:“ 201”,“ config sync time(sec)”:“ 0”,“ configuration state”:“无MM许可证“,“ ip地址”:“ 1.1.124.2”,“ IPv6地址”:“无”,“位置”:“ building1.floor1”,“模型”:“ Arubamc-va”,“ name”:“ arubamc-va“,“状态”:“ down”,“ type”:“ MD”,“版本”:“ 8.5.5.0.0_70258”}],“ _data”:[“ 2”],“ _Meta”:[IP地址“”,“ ipv6地址”,“名称”,“位置”,“类型”,“模型”,“版本”,“状态”,“配置状态”,“ config sync time(sec)”,“ config ID”]}

How to rename the APs via APIs

Answer:Obtain the list of APs that needs the change in name. (one can use showcommand API and issue “show ap database” query to get list of APs terminated in a MD).
Use one of the two options . But, changing AP name in the allowlist entry takes precedence over ap_rename or AP provisioning parameters.

Step 1:Change the AP name in existing Allowlist entry. (Reboot the AP to see the name change. Change in this step takes precedence over other two steps.)

API:post /object /wdb_cpsec_modify_mac
URL:https://:4343/v1/configuration/object/wdb_cpsec_modify_mac?config_path=%2Fmd&UIDARUBA=XXXX

{     "ap_name": "TEST-1",     "name": "ff:ff:ff:ff:ff:ff"     }

Step 2:Use ap_rename API (reboots the AP after name change)

API:POST /object/ap_rename
URL:https://:4343/v1/configuration/object/ap_rename?config_path=%2Fmd&UIDARUBA=XXXX

{     "wired-mac": " ff:ff:ff:ff:ff:ff ",     "new-name": "TEST-2"     }

AP provisioning workflow via API

Step 1:Load AP bootinfo into the MD.

API:POST /object/prov_ap_read_bootinfo
POST /object/read_bootinfo
URL:https://:4343/v1/configuration/object/prov_ap_read_bootinfo?config_path=%2Fmd&UIDARUBA=XXXX

{         "wired-mac": "ff:ff:ff:ff:ff:ff"       }

We could do it also read boot info with "wired-mac", ap-name", ip-addr", ip6-addr"

 警告:第1步是强制性的。如果我们试图re-provision AP without following step1, existing provisioned parameters of the AP will be reset/lost.

Step 2:Changing only AP name(we could change any parameter), other parameters were read from bootinfo in previous step.

API:POST /object/ap_prov (Other parameters are supported by this API as well. ‘ap-name’ being one of them)
URL:https://:4343/v1/configuration/object/ap_prov?config_path=%2Fmd&UIDARUBA=XXXX

{         "ap_name": {           "ap-name": "TEST-3"           }         }

Step 3:Re-provisions the AP based on the provisioning params. This will over-write all the AP provisioning params, so do step1 first. 

API:POST /object/ap_reprovision
URL:https://:4343/v1/configuration/object/ap_reprovision?config_path=%2Fmd&UIDARUBA=XXXX

{           "wired-mac": "ff:ff:ff:ff:ff:ff"         }

Did this page help you?
Baidu