Wireless

 View Only
last person joined: 24 days ago 

Ask questions and share experiences with Mist APs, Marvis, and all things wireless and Wi-Fi.
  • 1.  Bulk names APs using python script

    Posted 02-24-2024 20:20

    Hi all,

    I'm a novice with Python and when trying to bulk rename APs with the guide:Renaming Access Points Use Case , I get the error:

    main-rename-ap.py: error: the following arguments are required: config_file, aps_names

    Has anyone succesfully tried this? If so, can you share any pointers please?



    ------------------------------
    STUART JONES
    ------------------------------


  • 2.  RE: Bulk names APs using python script

    Posted 03-04-2024 15:35

    Hi Stuart,

    Did you create separate files for config_file.json and ap-names.csv? This need to be in the same directory as main-rename-ap.py.

    This is an example of the config_file.json file:

     {
      "api": {
        "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "token": "ApUYc...hsO",
        "mist_url": "https://<api-endpoint>.mist.com/api/v1/"
      },
      "site": {
        "name": "<site-name>"
      }
    }

    You would insert your unique variables (org_id, token, and site name) to connect to Mist.

    This is an example of the contents of the CSV file:

    name,mac
    <ap-name1>,aabbcc001122
    <ap-name2>,aabbcc001123
    <ap-name3>,aabbcc001124

    This should change the AP's name from the MAC to a name, in this case <ap-name*>.

    Hope this helps.



    ------------------------------
    Keir Asher
    ------------------------------



  • 3.  RE: Bulk names APs using python script

    Posted 03-07-2024 10:12

    Hi Keir,

    The issues was I was when I was running the script I was only entering python ap-names-ap.py but is should have been python ap-names-ap.py config.json ap-names.csv. Juniper support helped me with it.

    Thanks for the suggestion.

    Stuart



    ------------------------------
    STUART JONES
    ------------------------------



  • 4.  RE: Bulk names APs using python script

    Posted 03-07-2024 15:23

    Hi Stuart,

    We have updated the document to correct the config.json file and to include specific instructions about running the Python script. 

    You can see the updated document here.

    Thanks for reaching out.



    ------------------------------
    Pete Robbins
    ------------------------------