delete(optional Boolean forceFlag)
Description:
Delete this server. Can only be used on a server object which has been retrieved using server::
getByName
(),
and it must not have been modified since the last time that it was retrieved. If the server is in use by
another object in the system, the flag
forceFlag
must be set to
‘TRUE’
in order for it to be deleted.
Returns:
Map containing message string with a status code. Status code will be 0 if the deletion was successful and non-
zero otherwise.
Example:
$sv = server::getByName(“sv00”);
// Try to delete it, if it fails, force the deletion.
$value = $sv->delete();
if ($value[“status”] != 0) {
// Print out the reason for the failure, accessible using ‘lastrun’ command
echo “Failed to delete because: “, $value[“message”];
$value = $sv->delete(TRUE);
}
commit()
Description:
Push the changes to this server into the permanent configuration. If this server object was created using
getByName(),
this operation is treated as a modify. If it was created using the new keyword, it is treated as
an addition.
Returns:
Map containing message string with a status code. Status code will be 0 if the commit was successful and non-
zero otherwise.
Example:
// Create a new server, then modify it
$sv = new server;
$sv->name = "newsv";
$sv->proto = "tcp";
$sv->ip = "1.2.3.4";
$sv->port = 80;
$sv->commit();
// If we don’t do getByName(), the commit() below would fail with ‘object already
exists’ error because the system will try to add this object instead of modify it.
$sv = server::getByName("newsv");
$sv->port = 443;
$sv->commit();
Copyright © 2014 Coyote Point Systems, A Subsidiary of Fortinet, Inc.
All Rights Reserved.
691
Equalizer Administration Guide
Summary of Contents for Equalizer GX Series
Page 18: ......
Page 32: ...Overview 32 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 42: ......
Page 52: ......
Page 64: ......
Page 72: ......
Page 76: ......
Page 228: ......
Page 238: ......
Page 476: ......
Page 492: ......
Page 530: ......
Page 614: ......
Page 626: ......
Page 638: ......
Page 678: ......
Page 732: ...Using SNMP Traps 732 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 754: ......
Page 790: ......
Page 804: ......
Page 842: ......
Page 866: ......