Menu

#412 Import of Hosts does not work any longer

1.2
open
nobody
None
1
2016-04-27
2016-04-26
Markus
No

Since upgrade from 1.1 to 1.2.1 the import of hosts via excel sheet does not work any longer: the "active" state isn't recognized any longer, so the hosts will be displayed not as used after import. You have to manually edit each host and mark it as used. I have tried "used" and "active" in the column "ip state", but it doesn't work.
In the import template available in the web gui there isn't any longer some referency with the valid keywords as in phpipam 1.1.
In screenshot 1 and 2 you can see the import process. In screenshot no. 3 you can find some strange zero behind each imported host address...
I have attached the used excel sheet as well, which is the one available in the web gui of phpipam.

1 Attachments

Discussion

  • Markus

    Markus - 2016-04-26

    Having a look into the MySQL tables I have found a way to successfully import the hosts: using keyword "Used" (instead of "used"; it is case sensitive) the active state of the host is imported and displayed correct now.
    So I have the following suggestions for an improvement:
    1. the importer should check if the used keywords in the excel/csv file are known and have a reference in the reference table "ipTags". If not, there should be displayed an error/warning message
    2. in the excel template should be added a reference with all available keywords usable in the columns

     

    Last edit: Markus 2016-04-26
  • Markus

    Markus - 2016-04-26

    In the webgui of phpIPam V.1.2.1 the columns of the xls/csv file should be: ip | State | Description | hostname | MAC | Owner | Device | Port | Note | ..custom fields...

    but the import script parses the xls file with the following columns:

    ip | State | Description | DNS-Name | FirewallAdressObject | MAC | Owner | Switch/Device | Port | Note | ..custom fields...

    So the columns in the xls template seems to be wrong and the information in the GUI as well.

     
  • Markus

    Markus - 2016-04-26

    ./app/subnets/import-subnet/import-file.php (Line 117ff):

                    // set insert / update values
                    $address_insert = array("action"=>$action,
                                                                    "subnetId"=>$_POST['subnetId'],
                                                                    "ip_addr"=>$lineArr[0],
                                                                    "state"=>$Addresses->address_type_type_to_index($lineArr[1]),
                                                                    "description"=>$lineArr[2],
                                                                    "dns_name"=>$lineArr[3],
                                                                    "firewallAddressObject"=>$lineArr[4],
                                                                    "mac"=>$lineArr[5],
                                                                    "owner"=>$lineArr[6],
                                                                    "switch"=>$lineArr[7],
                                                                    "port"=>$lineArr[8],
                                                                    "note"=>$lineArr[9]
                                                                    );
    
     
  • Anonymous

    Anonymous - 2016-04-27

    will it ever be fixed ?

     
  • Anonymous

    Anonymous - 2016-04-27

    its not just the zero`s added
    the import preview seems fine but the costomized tabled \ sections are not pasting to place and or at all

     

Anonymous
Anonymous

Add attachments
Cancel