HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer CommunityLog 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": "<enter-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": "<enter-md-ip-where-AP-terminates>" 
} 
}

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": "<ente-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 Success HTTP code returned by the POST API request doesn’t mean the config is pushed to all the MDs in mentioned config path. Use showcommand API (/v1/configuration/showcommand) to execute CLI based “show switches” command. Based on Config ID and Configuration State, we can know if the config is in sync with all/required MD after POST. Config ID for all MDs will increase regardless of change to a specific MD.

Step 1: Use showcommand API

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

None
{ 
  "All Switches": [ 
    { 
      "Config ID": "214", 
      "Config Sync Time (sec)": "0", 
      "Configuration State": "UPDATE SUCCESSFUL", 
      "IP Address": "1.1.124.1", 
      "IPv6 Address": "None", 
      "Location": "Building1.floor1", 
      "Model": "ArubaMM-VA", 
      "Name": "ARUBA-MM", 
      "Status": "up", 
      "Type": "master", 
      "Version": "8.5.0.0_70258" 
    }, 
    { 
      "Config ID": "201", 
      "Config Sync Time (sec)": "0", 
      "Configuration State": "NO MM LICENSE", 
      "IP Address": "1.1.124.2", 
      "IPv6 Address": "None", 
      "Location": "Building1.floor1", 
      "Model": "ArubaMC-VA", 
      "Name": "ArubaMC-VA", 
      "Status": "down", 
      "Type": "MD", 
      "Version": "8.5.0.0_70258" 
    } 
  ], 
  "_data": [ 
    "2" 
  ], 
  "_meta": [ 
    "IP Address", 
    "IPv6 Address", 
    "Name", 
    "Location", 
    "Type", 
    "Model", 
    "Version", 
    "Status", 
    "Configuration State", 
    "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"

 WARNING: Step 1 is mandatory. If we try to 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" 
        }