ibettinger / racktables

RackTables source code
http://racktables.org/
GNU General Public License v2.0
20 stars 11 forks source link

feature request: method to get system by name (fqdn or visible label or "name") #3

Open sjoeboo opened 12 years ago

sjoeboo commented 12 years ago

We would lik to query for a given system and get back its location data. We key off of fqdn/hostname, which is used for fqdn, visible label, and the object name.

soffi commented 11 years ago
// get object_id by its FQDN
// using function searchByMgmtHostname()
// soffanias@gmail.com
case 'searchByMgmtHostname':
    require_once 'inc/init.php';

    assertStringArg ("fqdn", TRUE);

    $object_id = searchByMgmtHostname(( $_REQUEST['fqdn'] ));

    sendAPIResponse($object_id);
    break;