HM NG: add APs with CSV: file format ?

  • 2
  • Question
  • Updated 2 months ago
Hi All, I need to know the right field sequence to bulk add APs. I have got suggestions about using this sequence but it works partially

# Serial Number,Hostname,IP Address,Network Policy,Location,Device,Mode,Device Function,Netmask,Default Gateway,Country Code,Wifi0 Radio Mode,Wifi0 Operation Mode,Wifi0 Channel,Wifi0 Power,Wifi1 Radio Mode,Wifi1 Operation Mode,Wifi1 Channel,Wifi1 Power,HiveOS,Supplemental CLI Name

For example inserting 02121212121212,FG-AP2,192.168.1.96,Policy2 only the first 2 fileds are uploaded, the rest is ignored

I am asking
- what are the fields really available to populate in the CSV
- what the right sequence is

Thanks

Franco - Italy
Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 2
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Hi Franco,

Good question. I do not know so I will go and dig in to this over the weekend and get back to you, assuming nobody else knowledgable about this does not reply first.

I have to say, ideally, we should be using XML and not CSV for this these days. There are fundamental problems with differences in format/escaping between CSV implementations and it is inherently error prone as a format, it is not self-documenting in any way and there is no schema.

One for the feature request pile perhaps! :-)

Regards,

Nick
(Edited)
Photo of Karthik Krishnaswamy

Karthik Krishnaswamy

  • 13 Posts
  • 4 Reply Likes

There's a sample csv file provided in our help documentation. Take a look. http://docs.aerohive.com/330000/docs/help/english/ng/learning-whats-new.htm#gui/configuration/configuring-auto-provisioning.htm

Thanks

Karthik

Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes
Team, I did a couple of testst and the result is not positive at the moment

1- both / and # seemns NOT to be understood as comments if paired // or ##
2- reducing the cvs file to very minumum here is what I did and wht has been loaded

File contains - sorry for the formatting here, the file is 3 lines, first seems to be mandatory as shown or nothing is uploaded

#{Serial Number},{Host Name},{Device Model},{Device Function},{Network Policy},{Location},{Static IP Address},{Netmask},{Default Gateway},{Country Code},{Wifi0 Radio Profile},{Wifi0 Operation Mode},{Wifi0 Channel},{Wifi0 Power},{Wifi1 Radio Profile},{Wifi1 Operation Mode},{Wifi1 Channel},{Wifi1 Power},{HiveOS},{Supplemental CLI Name}
33011101900166,AP350-2,AP350,AP,Student-Policy,Sunnyvale,10.0.21.66,255.255.255.0,10.0.21.254,840,custom-radio-profile-wifi0,1,10,0,custom-radio-profile-wifi1,4,44,0,6.5r3,CLI-123
12113060701333,FG-AP-Loaded,AP121,APl,prova2,Floor 2,192.168.1.95,255.255.255.0,192.168.1.254,,,,,,,,,,,

ANd the result of the upload is... see attached file. Hostname is wrong, IP parameters nto assigned, location not assigned etc...

Can you please tell me what did I wrong ?

Thx
Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes
Adding more:

1- first line seems to be very relevant to the Upload, for example

- if fields in the first line have brackets, the hostname field is populated with the Serial Number. so I would consider incorrect a first line format like this:   #{Serial Number},{Host Name},{Device Model},{Device Function},{Network Policy},{Location},{Static IP Address},{Netmask},{Default Gateway},{Country Code},{Wifi0 Radio Profile},{Wifi0 Operation Mode},{Wifi0 Channel},{Wifi0 Power},{Wifi1 Radio Profile},{Wifi1 Operation Mode},{Wifi1 Channel},{Wifi1 Power},{HiveOS},{Supplemental CLI Name}

- if first line is like this, at\ list the hostname is loaded correctly - no brackets
#Serial Number,Hostname,Device Model,Device Function,Network Policy,Location,Static IP Address,Netmask,Default Gateway,Country Code,Wifi0 Radio Profile,Wifi0 Operation Mode,Wifi0 Channel,Wifi0 Power,Wifi1 Radio Profile,Wifi1 Operation Mode,Wifi1 Channel,Wifi1 Power,HiveOS,Supplemental CLI Name

Still Serial Number and hostname are the ONLY fileds copied in the upload.

One more Q: what is meant to be typed in the 'location' field? The location or buildind or floor in the Plan? The location column in the devicelist displays for example the assigned floor in the building of a location ( for example FGTest >> Rome >> via Teulada 20 >> floor 2) ... how must this be reported in the cvs file?
Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes
Still me, working on this:

1- I was using the cvs file to import the most of the details in the section Monitor -> Device -> + -> and usind the CSV file but from here the only imported info are Serial Number and Hostname 

2- I am now working in the autoprovisioning area and it looks like the right place to use the proposed cvs file is there.

Thanks so far
Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes
Ok, the sample csv file works fine in the Autoprovisioning section.

One question remains: auto assigning  the location. What should I put in the location field? For example in my sample config tha AP is assigned to Floor1 of a building in a city, and it looks like the location assigned is:  FG test > Rome > via teulada 20 > 2nd floor

How do I put this in the csv file ?

thx

F
Photo of Hunter Hearne

Hunter Hearne

  • 19 Posts
  • 0 Reply Likes
I am hoping this revives this post -- 

I have been trying to figure out how to upload cvs / xml for auto provisioning AP's as they come online. Where in the world do you see an upload button or option in the modify tab or auto provisioning section??

This thread has been extremely helpful - even more than my 3 or 4 threads on the topic. 
Photo of Franco Gobbetti

Franco Gobbetti

  • 45 Posts
  • 0 Reply Likes
Hunter, I am not sure I got your question completely but let me share what I have experienced so far - maybe the answer is there :-)

1- csv and XML are two separate things and they do not mix and match at the moment
2- for .csv the format what I found working is the following - I do not claim full credits on this as many tests have been done with other mates so it's a shared result

the csv format is

//{Serial Number},{Host Name},{Device Model},{Device Function},{Network Policy},{Location},{Static IP Address},{Netmask},{Default Gateway},{Country Code},{Wifi0 Radio Profile},{Wifi0 Operation Mode},{Wifi0 Channel},{Wifi0 Power},{Wifi1 Radio Profile},{Wifi1 Operation Mode},{Wifi1 Channel},{Wifi1 Power},{HiveOS},{Supplemental CLI Name}

I still do not have a clue of what is the right value for some fileds but let me share what I found working

Example for my Home Lab
1211306070xxxx,APName,,,APNetworkPolicy,BuildingX|FloorY,192.168.1.73,255.255.255.0,192.168.1.254,380,access,1,6,14,access,1,36,6,,

- skip the fields you do not need to fill ( for example IP address, gateway etc) but respect the commas, must be 19 commas in total

-do not fill Device Model, Device function - I have not found the right value to fill those and if you fill it wrong the HM will not be happy and refuse the .csv when you save in the Autoprovisioning pane

-for the WiFixRadioProfile field I tried "access" or "1" and they both are ok and lead me to have the AP working as an AP  for client Access - do not know what to write if you want to use it as backhaul or else. But this field seems not to be related to the Radio Profile you want this AP to use, for Radio profile you have to make a manual assignement or assign via the Device template

-Another interesting field is Location: I have been suggested to use Building|Floor and it works

-Also whatever values you put in the WiFIxOperationMode - WiFixChannel - WiFixPower - seem not to be relevant, it all goes Auto

Try the sample, play a bit around but I think this will do most of the job

To have autoprovisioning working you have to:

1- prepare the .csv file and upload it
2- after this, add the new SN of the APs you listed in the .csv file in the section "Add real Devices"

It's a bit of a shame having to upload the SN twice but this is the way it is at this stage...

When done, turn on a new AP ( or anyway an AP whose SN was not present in that  HM  before you added as a new device) and you will see the AP  importing the values from the .csv

Last, this worked on HM NG Cloud 11.20 , haven't tried on HM NG On prem or HM Classic

I raised to my local Aerohive Engineer some requests to make cvs and XML more integrated , I think this will be a matter of time....

Hope this helps

Regs

Franco
(Edited)
Photo of Paul Smith

Paul Smith

  • 9 Posts
  • 0 Reply Likes
So a year or so later and I'm now trying to answer the same questions :)

Is this actually a genuine feature or a mythical fantasy. I can just about add a serial number and hostname by hacking the sample csv file to bits but none of the useful stuff seems to do anything (location, radio profiles, power, channels etc)

Any updates from anyone at Aerohive or anyone that's been more successful with it?
Photo of Robert Haviland

Robert Haviland

  • 1 Post
  • 0 Reply Likes
I just imported with these fields...
//Serial Number,Node ID,Host Name,Network Policy,Location,Country Code,Wifi0 Radio Profile,Wifi0 Admin State,Wifi0 Operation Mode,Wifi0 Channel,Wifi0 Power,Wifi1 Radio Profile,Wifi1 Admin State,Wifi1 Operation Mode,Wifi1 Channel,Wifi1 Power,VHM Name

Several items didn't appear to import correctly.
Network Policy,WifiX Radio Profile,WifiX Admin State,WifiX Operation Mode,WifiX Channel,WifiX Power

Channel and Power are very important to me as we tend to static most large deployments. The Network policy and Radio Profiles aren't a big deal as I can multi-edit them.