예제 #1
0
파일: ophandlers.php 프로젝트: xtha/salt
function unlinkPort()
{
    assertUIntArg('port_id');
    commitUnlinkPort($_REQUEST['port_id']);
    showSuccess("Port unlinked successfully");
}
예제 #2
0
파일: api.php 프로젝트: xtha/salt
         $remote_port_type = $remote_port_info['oif_name'];
         throw new InvalidArgException('remote_port', $_REQUEST['remote_port'], "invalid argument: port types {$port_type} (local) and {$remote_port_type} (remote) can't be linked");
     }
     linkPorts($port_info['id'], $remote_port_info['id'], $_REQUEST['cable']);
     sendAPIResponse(array(), array('message' => 'ports linked successfully', 'local_object' => $port_info['object_id'], 'remote_object' => $remote_port_info['object_id'], 'local_port' => $_REQUEST['port'], 'remote_port' => $_REQUEST['remote_port']));
     break;
     // unlink a port
     //    UI equivalent: /index.php?module=redirect&op=unlinkPort&port_id=<<ID>>&object_id=<<ID>>&page=object&tab=ports
     //    UI handler: unlinkPort()
 // unlink a port
 //    UI equivalent: /index.php?module=redirect&op=unlinkPort&port_id=<<ID>>&object_id=<<ID>>&page=object&tab=ports
 //    UI handler: unlinkPort()
 case 'unlink_port':
     require_once 'inc/init.php';
     assertUIntArg('port_id');
     commitUnlinkPort($_REQUEST['port_id']);
     sendAPIResponse(array(), array('message' => 'port unlinked successfully', 'port_id' => $_REQUEST['port_id']));
     break;
     // get data on a given port
     //    UI equivalent: none
     //    UI handler: none
 // get data on a given port
 //    UI equivalent: none
 //    UI handler: none
 case 'get_port':
     require_once 'inc/init.php';
     assertUIntArg('port_id');
     $port_info = getPortInfo($_REQUEST['port_id']);
     sendAPIResponse($port_info);
     break;
     // delete an object