|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Configuration
The Configuration interface contains configuration operations common to all sectors of BPR.
BPR APIs are defined with arguments and properties. Arguments are given to indicate the most commonly used fields that must be specified in an API call. In many cases, arguments may be set to NULL. Properties are specified in the form of a map containing key/value pairs.
| Method Summary | |
|---|---|
void |
addClassOfService(DeviceType deviceType,
String cosName,
Map<String,Object> properties)
Defines a class of service. |
void |
addCustomPropertyDefinition(String customPropertyName,
DataType customPropertyDataType)
Adds a custom property definition to BPR. |
void |
addDHCPCriteria(String criteriaName,
String clientClass,
String includeSelectionTags,
String excludeSelectionTags,
Map<String,Object> properties)
Adds a DHCP Scope Selection Criteria to the database. |
void |
addFile(FileType type,
String name,
byte[] filebytes,
Map<String,Object> properties)
Adds a file to the system. |
void |
addLicenseKey(byte[] licenseFileContent)
Adds a license key to BPR. |
void |
addUser(String userId,
String password,
Map<String,Object> properties)
This method is used to create a new user in the database. |
void |
changeClassOfServiceProperties(String cosName,
Map<String,Object> propToAdd,
List<String> propToRemove)
Changes the properties of a class of service. |
void |
changeDHCPCriteriaClientClass(String criteriaName,
String newClientClass)
Changes a DHCP Scope Selection Criteria's client class. |
void |
changeDHCPCriteriaExcludeSelectionTags(String criteriaName,
String newExcludeSelectionTags)
Changes a DHCP Scope Selection Criteria's Exclude Selection Tags. |
void |
changeDHCPCriteriaIncludeSelectionTags(String criteriaName,
String newIncludeSelectionTags)
Changes a DHCP Scope Selection Criteria's Include Selection Tags. |
void |
changeDHCPCriteriaProperties(String criteriaName,
Map<String,Object> properties,
List<String> propertyRemoves)
Changes a DHCP Scope Selection Criteria's properties. |
void |
changeDPEDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
Changes DPE default properties. |
void |
changeExtensionPointSettings(Map<String,Object> properties,
List<String> propertyRemoves)
Changes Network Registrar extension point settings. |
void |
changeFileProperties(String name,
Map<String,Object> propToAdd,
List<String> propToRemove)
Changes the properties of a file. |
void |
changeProvGroupProperties(String provGroupName,
Map<String,Object> propToAdd,
List<String> propToRemove)
Changes the properties of a provision group. |
void |
changePublishingPluginSettings(String plugin_name,
Map<String,Object> properties,
List<String> propertyRemoves)
Changes the publishing plugin defaults. |
void |
changeRDUDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
Changes RDU default properties. |
void |
changeSystemDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
Changes system default properties. |
void |
changeUser(String userId,
String password,
Map<String,Object> properties)
Method to modify user properties. |
void |
deleteClassOfService(String cosName)
Deletes the specified class of service. |
void |
deleteCNR(String cnrHost)
Deletes a Network Registrar server entry in the RDU. |
void |
deleteDHCPCriteria(String criteriaName)
Deletes a DHCP Scope Selection Criteria. |
void |
deleteDPE(String dpeHost)
Deletes a DPE server entry in the RDU. |
void |
deleteFile(String name)
Deletes a file from the system. |
void |
deleteLicenseKey(String serialNumber)
Deletes a license key from BAC. |
void |
deleteProvisioningGroup(String provGroupName)
Delete the specified provisioning group from BPR. |
void |
deleteUser(String userId)
Method to delete a user from database. |
void |
disablePublishingPlugin(String pluginClassname)
Disables a publishing plugin. |
void |
enablePublishingPlugin(String pluginClassname)
Enables a publishing plugin. |
void |
getAllClassesOfService(DeviceType deviceType)
Gets a list of the names of all classes of service for the specified device type. |
void |
getAllCNRs()
Retrieve a list of all the Network Registrar servers currently registered with the system. |
void |
getAllCustomPropertyDefinitions()
Gets a Map of all custom property definitions currently defined in the system. |
void |
getAllDHCPCriterias()
Gets a list of all DHCP Scope Selection Criterias defined in the system. |
void |
getAllDPEs()
Retrieve a list of all the DPE servers currently registered with the system. |
void |
getAllFileTypes()
Retrieves a List of the pre-defined FileType objects in the database. |
void |
getAllLicenseInfo()
Gets a Map of objects listing the enabled technologies and the enabled licensable functions for the system deployment. |
void |
getAllProvGroups()
Retrieve a list of all the provisioning groups. |
void |
getAllRDUs()
Retrieve a list of all the RDU servers currently registered with the system. |
void |
getAllSystemPropertyDefinitions()
Gets a Map of all pre-defined property definitions. |
void |
getAllUsers()
Method to get all users present in the system. |
void |
getClassOfServiceProperties(String cosName)
Gets the properties for the given class of service. |
void |
getCNRDetails(String cnrHost)
Retrieve the details for a given Network Registrar server. |
void |
getDHCPCriteriaDetails(String criteriaName)
Gets Details of a DHCP Scope Selection Criteria. |
void |
getDPEDefaults()
Retrieve the DPE defaults in a map. |
void |
getDPEDetails(String dpeHost)
Retrieve the details of the specified DPE server. |
void |
getExtensionPointSettings()
Get the Network Registrar extension point settings (the ones related to BPR) in a map. |
void |
getFileBytes(String name)
Gets the bytes of a file from the system. |
void |
getFileProperties(String name)
Gets the properties of a file from the system. |
void |
getLicenseKeyData()
Gets a List of Maps of expanded license key data for all licenses which have been added to BPR. |
void |
getMatchingFilenames(FileSearchType searchType,
SearchBookmark sb,
int numberToReturn)
Get a list of files that match specific file type or file name criteria. |
void |
getProvGroupDetails(String provGroupName)
Get the details of a provisioning group. |
void |
getPublishingPlugins()
Gets the list of publishing plugins. |
void |
getPublishingPluginSettings(String plugin_name)
Retrieve the publishing defaults for a given publishing plugin. |
void |
getRDUDefaults()
Retrieve the RDU defaults in a map. |
void |
getRDUDetails(String rduHost)
Retrieve the details for a given RDU server. |
void |
getSystemDefaults()
Retrieve the system defaults in a map. |
void |
getUserDetails(String userId)
Retrieve the details for a given User. |
void |
removeCustomPropertyDefinition(String removeCustomPropertyName)
Removes a custom property definition from BPR. |
void |
replaceFile(String name,
byte[] filebytes)
Replaces the bytes of an existing file in the system. |
| Method Detail |
|---|
void addClassOfService(DeviceType deviceType,
String cosName,
Map<String,Object> properties)
This method will fail if the name parameter is specified as null, if
it contains only whitespace characters, or if it starts with the
TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the deviceType parameter is specified as null
or if the specified device type has not yet been registered with the
system (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified properties Map contains values
that are not relevant to this class of service or the property
value is null or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified deviceType parameter is
DeviceType.DOCSIS and the properties Map
does not contain a value for
ClassOfServiceKeys.COS_DOCSIS_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified deviceType parameter is
DeviceType.PACKET_CABLE_MTA
and the properties Map does not contain a value for
ClassOfServiceKeys.COS_PACKET_CABLE_MTA_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified deviceType parameter is
DeviceType.CABLEHOME_WAN_MAN
and the properties Map does not contain a value for
ClassOfServiceKeys.COS_CABLEHOME_WAN_MAN_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified properties Map contains a
ClassOfServiceKeys key for the class of
service external file name and that file has not yet been registred with
the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
This method will fail if the specified class of service name already
exists for the specified device type (error:
CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_EXISTS)
deviceType - Identifies which device type to add this class of
service for. This value is required and cannot
be null.cosName - The name of the class of service that, within the given
type, uniquely identifies this class of service.
This value is required, cannot be null or empty string
and must not contain characters other than letters,
digits, "-" and "-".properties - A Map of properties to associate with this class of
service. See DeviceType for the
valid key names. The properties map cannot be null and
must specify the a non-null value for the CoS file
name parameter particularly for the DeviceTypes -
DOCSISModem and PacketCableMTA. For other
DeviceTypes, if not used pass null.
DeviceType for more information.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWN)CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_EXISTS
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
Map cosProp = new HashMap();
cosProp.put(ClassOfServiceKeys.COS_DOCSIS_FILE, docsisFile1);
batch.addClassOfService(DeviceType.DOCSIS,"Gold",cosProp);
status = batch.post();
if ( status.isError() )
{
//Process batch failure
}
...
CommandStatusCode,
CommandStatus,
ClassOfServiceKeys
void changeClassOfServiceProperties(String cosName,
Map<String,Object> propToAdd,
List<String> propToRemove)
Note: You cannot change the name or type of a class of service. You can only change the set of properties which may have been associated with that class of service, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter).
Note: This command, if successful, will contact the
Configuration Regeneration Service and regenerate all the
devices assigned the Class of Service that was changed
with this command. The command will return immediately
with BatchStatusCode.BATCH_WARNING. CRS will fire
a CRSCompleteListener.CRS_COMPLETED event once it
has completed regenerating the configuration for all
devices with the changed Class of Service.
This method will fail if the name parameter is specified as null or if
it contains only whitespace character (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This command will fail if the name parameter starts with the
TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified class of service does not yet
exist for the specified device type (error:
CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)
This method will fail if the specified properties Map contains a
ClassOfServiceKeys key for the class of
service external file name and that file has not yet been registred with
the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
This method will fail if the deviceType associated with this class
of service is DeviceType.DOCSIS and the
propToRemove contains a value for
ClassOfServiceKeys.COS_DOCSIS_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the deviceType associated with this class
of service is DeviceType.PACKET_CABLE_MTA
and the propToRemove contains a value for
ClassOfServiceKeys.COS_PACKET_CABLE_MTA_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the deviceType associated with this class
of service is DeviceType.CABLEHOME_WAN_MAN
and the propToRemove contains a value for
ClassOfServiceKeys.COS_CABLEHOME_WAN_MAN_FILE (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the properties specified in the
propToAdd parameter are relevant properties for the
specified cos but the property value is null or data type is
invalid. (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the propToAdd
parameter also exist in propToRemove parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
cosName - The name of the class of service that, within the given
type, uniquely identifies this class of service.
This value is required, cannot be null or empty string
and must not contain characters other than letters,
digits, "-" and "-".propToAdd - A Map of additional or changed properties to
associate with this class of service. See
DeviceType for the
valid key names. The CoS file name parameter cannot be
changed to null particularly for the DeviceTypes
DOCSISModem and PacketCableMTA. For other
DeviceTypes, if not used pass null.propToRemove - A list of property names to remove from this
class of service. The CoS file name parameter cannot
be listed in the properties to remove list
particularly for the DeviceTypes DOCSISModem and
PacketCableMTA. For other DeviceTypes, if not
used pass null.
DeviceType for more information.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWN)CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWNCommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE
...
Batch batch;
BatchStatus status;
Map propAdd = new HashMap();
List propRemoves = new ArrayList();
propAdd.put(ClassOfServiceKeys.COS_DOCSIS_FILE, docsisFile1);
propRemoves.add(SNMPPropertyKeys.READ_COMMUNITY_STRING);
batch = conn.newBatch();
batch.changeClassOfServiceProperties( "gold",
propAdd,
propRemoves);
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus,
ClassOfServiceKeysvoid getAllClassesOfService(DeviceType deviceType)
Call ((List)CommandStatus.getData())
on the return from this method to retrieve the data. The List will
consist of the Strings that are the names of all defined classes of
service. If there is no classes of service is found, an empty list will be returned.
This method will fail if the deviceType parameter is specified as null
or if the specified device type has not yet been registered with the
system (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
deviceType - Identifies the device type of the class of service
names to retrieve. This value is required and cannot
be null.
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.getAllClassesOfService(DeviceType.DOCSIS);
status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCode,
CommandStatusvoid getClassOfServiceProperties(String cosName)
Call ((Map)CommandStatus.getData()) on
the return from this method to retrieve the data
CommandStatus.DATA_MAP. The Map will consist
of the key-value pairs which have been associated with this classes of
service.
This method will fail if the name parameter is specified as null or if
it contains only whitespace character (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This command will fail if the name parameter starts with the
TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified class of service does not yet
exist for the specified device type (error:
CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)
cosName - The name of the class of service that, within the given
type, uniquely identifies this class of service.
This value is required, cannot be null or empty string
and must not contain characters other than letters,
digits, "-" and "-".
GenericObjectKeys.OID_REVISION_NUMBERClassOfServiceKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.getClassOfServiceProperties("gold");
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
else
{
commandStatus = bstat.getCommandStatus(0);
Map resultMap = (Map) commandStatus.getData();
Iterator keys = resultMap.keySet().iterator();
System.out.println("Properties for DOCSIS COS");
while (keys.hasNext())
{
String key = (String)keys.next();
System.out.println(key +": " +resultMap.get(key));
}
}
...
CommandStatusCodevoid deleteClassOfService(String cosName)
This method will fail if the cosName parameter is specified
as null or if it contains only whitespace character (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This command will fail if the cosName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if deviceType which is associated with the
specified cosName is null or if the specified device type has
not yet been registered with the system (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified class of service does not yet
exist in the database(error:
CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)
This method will fail if the specified class of service has any
devices associated with it (error:
CommandStatusCode.CMD_ERROR_WRITE)
This method will fail if the name parameter specifies the special case
default class of service name, which cannot be deleted (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
cosName - The name of the class of service that, within the given
type, uniquely identifies this class of service.
This value is required, cannot be null or empty string
and must not contain characters other than letters,
digits, "-" and "-".
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_WRITECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.deleteClassOfService("gold");
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode
void changeSystemDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
This method will fail if the specified properties Map contains values
that are not relevant to system properties or the key value is null
or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
properties - The map of default properties to add/change.
If a property already exists, the old value will be
replaced with the new value.
If no properties are being added/modified, pass null.propertyRemoves - The list of default property key names to remove.
If no properties are being removed, pass null.
SNMPPropertyKeys.READ_COMMUNITY_STRINGSNMPPropertyKeys.WRITE_COMMUNITY_STRINGSNMPPropertyKeys.MIB_LISTSNMPPropertyKeys.MIB_SUPPLEMENTAL_LISTSNMPPropertyKeys.MIB_UNRESERVED_WORD_LISTSNMPPropertyKeys.MIB_SUPPLEMENTAL_UNRESERVED_WORD_LISTDiagnosticsKeys.DIAGNOSTICS_DEVICE_COUNTServerDefaultsKeys.SERVER_LOG_ENABLEServerDefaultsKeys.SERVER_LOG_LEVELServerDefaultsKeys.SERVER_LOG_MAXFILECOUNTServerDefaultsKeys.SERVER_LOG_MAXSIZETechnologyDefaultsKeys.DEFAULT_DEVICE_TYPE
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_DEVICE_COUNT_IS_NEGATIVECommandStatusCode.CMD_ERROR_DEVICE_COUNT_IS_LESS_THAN_RELATED_DEVICESCommandStatusCode.CMD_ERROR_DEVICE_COUNT_IS_GREATER_THAN_MAXIMUM
...
Map sysMap = new HashMap();
sysMap.put(SNMPPropertyKeys.WRITE_COMMUNITY_STRING,"private");
sysMap.put(SNMPPropertyKeys.READ_COMMUNITY_STRING,"public");
Batch batch = conn.newBatch();
batch.changeSystemDefaults(sysMap, null);
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus
void changeRDUDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
This method will fail if the specified properties Map contains values
that are not relevant to RDU properties or the key value is null
or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
The batch containing a call to this method will fail if properties that
attach classes to extension points are invalid as a result of the changes specifed
specified in the parameters to this call (error:
BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)
properties - The map of default properties to add/change.
If a property already exists, the old value will be
replaced with the new value.
If no properties are being added/modified, pass null.propertyRemoves - The list of default property key names to remove.
If no properties are being removed, pass null.
ServerDefaultsKeys.RDU_CONFIGURATION_EXTENSION_POINTServerDefaultsKeys.EXTENSION_POINT_JARFILEServerDefaultsKeys.RDU_DEVICE_DETECTION_CONFLICTING_DETECT_ENABLEServerDefaultsKeys.RDU_DEVICE_DETECTION_CONFLICTING_USE_ENABLEServerDefaultsKeys.RDU_DEVICE_DETECTION_EXTENSION_POINTServerDefaultsKeys.RDU_DEVICE_DETECTION_LOG_INFO_ENABLEServerDefaultsKeys.RDU_DEVICE_DETECTION_USE_DHCP_CIRCUIT_ID_ENABLEServerDefaultsKeys.RDU_DEVICE_DETECTION_USE_DHCP_CLASS_IDENTIFIER_ENABLEServerDefaultsKeys.RDU_DEVICE_DETECTION_USE_DHCP_REMOTE_ID_ENABLECCMKeys.CCM_ADDRESSCCMKeys.CCM_PORTCCMKeys.CCM_USERNAMECCMKeys.CCM_PASSWORDCCMKeys.CCM_ENABLECCMKeys.CCM_TIMEOUTServerDefaultsKeys.SERVER_LOG_ENABLEServerDefaultsKeys.SERVER_LOG_LEVELServerDefaultsKeys.SERVER_LOG_MAXFILECOUNTServerDefaultsKeys.SERVER_LOG_MAXSIZE
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE
...
Map rduMap = new HashMap();
rduMap.put(ServerDefaultsKeys.SERVER_TRACE_ENABLE, Boolean.TRUE);
rduMap.put(
ServerDefaultsKeys.RDU_CONFIGURATION_EXTENSION_POINT,
"testdefaultextpt,testcustomextpt");
rduMap.put(
ServerDefaultsKeys.RDU_DEVICE_DETECTION_EXTENSION_POINT,
"testdetectionextpt");
rduMap.put(PolicyKeys.PROMISCUOUS_MODE_ENABLED, Boolean.FALSE);
Batch batch = conn.newBatch();
batch.changeRDUDefaults(rduMap, null);
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeys,
BatchStatusCode,
CommandStatusCode
void changeDPEDefaults(Map<String,Object> properties,
List<String> propertyRemoves)
This method will fail if the specified properties Map contains values
that are not relevant to DPE properties or property value is null
or datatype is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
properties - The map of default properties to add/change.
If a property already exists, the old value will be
replaced with the new value.
If no properties are being added/modified, pass null.propertyRemoves - The list of default property key names to remove.
If no properties are being removed, pass null.
ServerDefaultsKeys.SERVER_LOG_ENABLEServerDefaultsKeys.SERVER_LOG_LEVELServerDefaultsKeys.SERVER_LOG_MAXFILECOUNTServerDefaultsKeys.SERVER_LOG_MAXSIZEServerDefaultsKeys.DPE_TIMESERVER_ENABLE_KEY_IPV4
...
Map dpeMap = new HashMap();
dpeMap.put(ServerDefaultsKeys.SERVER_TRACE_ENABLE, Boolean.TRUE);
Batch batch = conn.newBatch();
batch.changeDPEDefaults(dpeMap, null);
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeys,
CommandStatusCodevoid deleteDPE(String dpeHost)
Note: If the DPE comes online again, it will automatically re-register and create another entry in the list of DPEs.
This method will fail if the dpeHost parameter is null or contains only
whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the DPE specified by the dpeHost parameter does
not exist (error:
CommandStatusCode.CMD_ERROR_DPE_UNKNOWN)
dpeHost - The IP or FQDN of the DPE server to remove from BPR.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_DPE_UNKNOWN
...
Batch batch = conn.newBatch();
batch.deleteDPE("localhost");
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeys,
CommandStatusCodevoid deleteCNR(String cnrHost)
NOTE - If the Network Registrar comes online again, it will automatically re-register and create another entry in the list of Network Registrar servers.
This method will fail if the cnrHost parameter is null or contains only
whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the Network Registrar specified by the cnrHost
parameter does not exist (error:
CommandStatusCode.CMD_ERROR_CNR_UNKNOWN)
cnrHost - The IP or FQDN of the CNR server to remove from BPR.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_CNR_UNKNOWN
...
Batch batch = conn.newBatch();
batch.deleteCNR("localhost");
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeys,
CommandStatusCode
void changeExtensionPointSettings(Map<String,Object> properties,
List<String> propertyRemoves)
This method will fail if the specified properties Map contains values
that are not relevant to Network Registrar extension point properties
or the key value is null or data type is invalid
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if any of the required properties has null value
after running this command.
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
properties - The map of default properties to add/change.
If a property already exists, the old value will be
replaced with the new value.
If no properties are being added/modified, pass null.propertyRemoves - The list of default property key names to remove.
If no properties are being removed, pass null.
CNRExtensionSettingKeys.CNR_ATTRIBUTES_REQUIRED_IN_REQUEST_DICTIONARY
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_REQUEST_DICTIONARY_AS_BYTES
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_REQUEST_DICTIONARY_AS_STRINGS
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_ENVIRONMENT_DICTIONARY
CNRExtensionSettingKeys.CNR_ATTRIBUTES_REQUIRED_IN_V4_REQUEST_DICTIONARY
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_V4_REQUEST_DICTIONARY_AS_BYTES
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_V4_REQUEST_DICTIONARY_AS_STRINGS
CNRExtensionSettingKeys.CNR_ATTRIBUTES_REQUIRED_IN_V6_REQUEST_DICTIONARY
CNRExtensionSettingKeys.CNR_OPTIONS_REQUIRED_IN_V6_REQUEST_DICTIONARY
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_V6_REQUEST_DICTIONARY_AS_BYTES
CNRExtensionSettingKeys.CNR_OPTIONS_TO_READ_FROM_V6_REQUEST_DICTIONARY_AS_BYTES
CNRExtensionSettingKeys.CNR_ATTRIBUTES_REQUIRED_IN_V6_RELAY_DICTIONARY
CNRExtensionSettingKeys.CNR_OPTIONS_REQUIRED_IN_V6_RELAY_DICTIONARY
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_V6_RELAY_DICTIONARY_AS_BYTES
CNRExtensionSettingKeys.CNR_OPTIONS_TO_READ_FROM_V6_RELAY_DICTIONARY_AS_BYTES
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE
...
Map hm = new HashMap();
hm.put(
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_REQUEST_DICTIONARY,
"chaddr);
hm.put(
CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_ENVIRONMENT_DICTIONARY,
"test");
Batch batch = conn.newBatch();
batch.changeExtensionPointSettings(hm, null);
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CNRExtensionSettingKeys,
CommandStatusCode
void changeFileProperties(String name,
Map<String,Object> propToAdd,
List<String> propToRemove)
Note: You cannot change the name or type of a file. You can only change the set of properties which may have been associated with that file, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter). You can also change the file bytes of the file
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name does not exits
in BAC (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
This method will fail if the properties specified in the
propToAdd parameter are relevant properties for the
specified file type but the property value is null or data type is
invalid. (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the propToAdd
parameter also exist in propToRemove parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
The batch containing a call to this method will fail if the specified
file is a JAR file containing custom extension classes and the extension
configuration is invalid as a result of the replacement file contents
specified in the parameters to this call (error:
BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)
name - A name that uniquely identifies the file to replace. This
value must be specified and cannot be null.propToAdd - A Map of additional or changed properties to
associate with this file.propToRemove - A list of property names to remove from this
file.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWN
...
Batch batch;
BatchStatus status;
Map propAdd = new HashMap();
propAdd.put(FileKeys.DESCRIPTION, "Latest update");
batch = conn.newBatch();
batch.changFileProperties("gold.bin", propAdd, null);
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
BatchStatusCode,
CommandStatusCode,
CommandStatus
void changeProvGroupProperties(String provGroupName,
Map<String,Object> propToAdd,
List<String> propToRemove)
Note: You cannot change the name of a provision group. You can only change the set of properties which may have been associated with that provision group, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter).
This method will fail if the provGroupName parameter is null or contains only
whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the propToAdd or propToRemove
parameter contains invalid properties, (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the properties specified in the
propToAdd parameter are relevant properties for the
specified provGroup but the property value is null or data type is
invalid. (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the propToAdd
parameter also exist in propToRemove parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a provision group with the specified name
does not exist in the system (error:
CommandStatusCode.CMD_ERROR_WRITE)
This method will fail if the propAdd Map contains
DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or
DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both
and the IPAddress list contains invalid IPAddress or duplicated entry (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the propAdd Map contains
DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or
DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both
and the DhcpLeaseQueryKeys.DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE
value is set to true (error:
CommandStatusCode.CMD_ERROR_WRITE)
Note This command finds and uses the value of this property
DhcpLeaseQueryKeys#DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE
in the following order:
This method will fail if the specified propToRemove List contains
value DhcpLeaseQueryKeys.DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE
(error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified propToAdd List contains
DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or
DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both
and the IPAddresses of the CNR server(s) in this provisioning group does
not contains the IPAddresses specified in the
DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or
DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both
(error: CommandStatusCode.CMD_ERROR_WRITE)
provGroupName - A name that uniquely identifies the name of provision
group. This value must be specified and cannot be null.propToAdd - A Map of additional or changed properties to
associate with this provision group.propToRemove - A list of property names to remove from this
provision group.
Relevant properties that may be added or removed:
ProvGroupCapabilitiesKeys.ENABLED_CAPABILITIES
...
Batch batch;
BatchStatus status;
Map propAdd = new HashMap();
propAdd.put(ProvGroupCapabilitiesKeys.ENABLED_CAPABILITIES,
ProvGroupCapabilitiesKeys.CABLE_HOME_V4);
batch = conn.newBatch();
batch.changeProvGroupProperties("default", propAdd, null);
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
BatchStatusCode,
CommandStatusCode,
CommandStatusvoid getSystemDefaults()
Call ((Map)CommandStatus.getData())
on the return from this method to retrieve the data. The map will
contain key-value pairs for all of the system default properties.
GenericObjectKeys.OID_REVISION_NUMBERSNMPPropertyKeys.READ_COMMUNITY_STRINGSNMPPropertyKeys.WRITE_COMMUNITY_STRINGSNMPPropertyKeys.MIB_LISTSNMPPropertyKeys.MIB_SUPPLEMENTAL_LISTSNMPPropertyKeys.MIB_UNRESERVED_WORD_LISTSNMPPropertyKeys.MIB_SUPPLEMENTAL_UNRESERVED_WORD_LISTDiagnosticsKeys.DIAGNOSTICS_DEVICE_COUNT
...
Batch batch = conn.newBatch();
batch.getSystemDefaults();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
SNMPPropertyKeys,
Mapvoid getRDUDefaults()
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the data. The map will contain
key-value pairs for all of the RDU default properties.
GenericObjectKeys.OID_REVISION_NUMBERServerDefaultsKeys.RDU_CONFIGURATION_EXTENSION_POINTServerDefaultsKeys.EXTENSION_POINT_JARFILEServerDefaultsKeys.RDU_DEVICE_DETECTION_EXTENSION_POINTServerDefaultsKeys.SERVER_LOG_ENABLEServerDefaultsKeys.SERVER_LOG_LEVELServerDefaultsKeys.SERVER_LOG_MAXFILECOUNTServerDefaultsKeys.SERVER_LOG_MAXSIZE
...
Batch batch = conn.newBatch();
batch.getRDUDefaults();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeysvoid getDPEDefaults()
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the data. The map will contain
key-value pairs for all of the DPE default properties.
GenericObjectKeys.OID_REVISION_NUMBERServerDefaultsKeys.SERVER_LOG_ENABLEServerDefaultsKeys.SERVER_LOG_LEVELServerDefaultsKeys.SERVER_LOG_MAXFILECOUNTServerDefaultsKeys.SERVER_LOG_MAXSIZEServerDefaultsKeys.DPE_TIMESERVER_ENABLE_KEY_IPV4
...
Batch batch = conn.newBatch();
batch.getDPEDefaults();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
ServerDefaultsKeysvoid getAllDPEs()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will consist of
String that the names of DPE server. If there is no DPE servers is
currently registered, an empty List will be returned.
...
Batch batch = conn.newBatch();
batch.getAllDPEs();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus,
Listvoid getAllRDUs()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will consist
of String that is the names of the RDU server exist in the system. If there is
no RDU server currently registered, an empty List will be returned.
...
Batch batch = conn.newBatch();
batch.getAllRDUs();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus,
Listvoid getAllProvGroups()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will contain
a string that is the names of the provisioning group currently exist
in the database. If there is no provisioning
groups currently exist in the database, an empty List will be returned.
...
Batch batch = conn.newBatch();
batch.getAllProvGroups();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus,
Listvoid getDPEDetails(String dpeHost)
Call ((Map)CommandStatus.getData()) on
the return from this method to retrieve the data. The map will contain
properties and values for the specified DPE server.
This method will fail the cnrHost parameter is null or contains
all whitespace (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified DPE is unknown to the RDU
(error:
CommandStatusCode.CMD_ERROR_DPE_UNKNOWN)
dpeHost - The FQDN or IP address for the desired DPE server. This
parameter is required and must not be null.
GenericObjectKeys.OID_REVISION_NUMBERDPEDetailsKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_DPE_UNKNOWN
...
Batch batch = conn.newBatch();
batch.getDPEDetails("localhost");
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
Mapvoid getRDUDetails(String rduHost)
Call ((Map)CommandStatus.getData()) on
the return from this method to retrieve the data. The map will contain
properties and values for the specified RDU server.
This method will fail the rduHost parameter is null or contains
all whitespace (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the dpecified RDU is unknown (error:
CommandStatusCode.CMD_ERROR_RDU_UNKNOWN)
rduHost - The FQDN or IP address of the RDU server. This
parameter is required and must not be null.
GenericObjectKeys.OID_REVISION_NUMBERRDUDetailsKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_RDU_UNKNOWN
...
Batch batch = conn.newBatch();
batch.getRDUDetails("localhost");
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
Mapvoid getAllCNRs()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will
consist of the String that are the names of Network Registrar Server.
If there is no Network Registrar servers are currently registered,
an empty List will be returned.
...
Batch batch = conn.newBatch();
batch.getAllCNRs();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatusvoid getCNRDetails(String cnrHost)
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the data. The map will contain
properties and values for the specified CNR server.
This method will fail the cnrHost parameter is null or contains
all whitespace (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the dpecified Network Registrar is unknown to
the RDU (error:
CommandStatusCode.CMD_ERROR_CNR_UNKNOWN)
cnrHost - The FQDN or IP address for the desired CNR server.
GenericObjectKeys.OID_REVISION_NUMBERCNRDetailsKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_CNR_UNKNOWN
...
Batch batch = conn.newBatch();
batch.getCNRDetails("localhost");
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
Mapvoid getExtensionPointSettings()
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the data. The map will contain
key-value pairs for all of the extension point settings.
GenericObjectKeys.OID_REVISION_NUMBERCNRExtensionSettingKeys
for more details
...
Batch batch = conn.newBatch();
batch.getExtensionPointSettings();
BatchStatus status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
Map
void addFile(FileType type,
String name,
byte[] filebytes,
Map<String,Object> properties)
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters, or if the fileBytes parameter is null, or if the type
parameter is null (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name has already been
added to the system (error:
CommandStatusCode.CMD_ERROR_WRITE)
This method will fail if the type paramater is null (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the properties specified in the
properties parameter are relevant properties for the
specified file type but the property value is null or data type is
invalid. (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
The batch containing a call to this method will fail if the specified
file is a JAR file and the extension configuration is invalid as a
result of the addition of this file (error:
BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)
type - The FileType of this file. Once set, this cannot
be changed. This
value must be specified and cannot be null.name - A name that uniquely identifies this file. Name string
characters are resticted to alphanumeric characters, "-",
".", and "_". All leading and trailing whitespace is
automatically trimmed from this value. Names cannot
have spaces in them. A dot in the name is optional. This
value must be specified and cannot be null.filebytes - A byte array that contains the entire contents of the
file being added to the system. The size of the byte
array (and, therefore, of the file) is limited to
Integer.MAX_VALUE
(2,147,483,647) bytes.properties - A map of additional attributes for this file.
If not used, pass null.
... //extract the contents of a file into a byte array //such that it may be passed in as the //second parameter of this method:
String pathnamestring = "/tmp/inpFilename.cm"; File f = new File(pathnamestring); RandomAccessFile raf = null; long length = 0; byte[] bytes = null; try { raf = new RandomAccessFile(f, "r"); length = raf.length(); // Maximum byte length of file is // Integer.MAX_VALUE (2,147,483,647) if ( length > (long)Integer.MAX_VALUE ) { // Process "file too long" error System.err.println("File too long!"); return; } bytes = new byte[(int)length]; raf.readFully(bytes); } catch (IOException t) // likely to be IOException { // Do exception processing here return; } Batch batch = conn.newBatch(); batch.addFile(FileType.CABLELABS_CONFIGURATION_TEMPLATE, "gold.cm", bytes, null); BatchStatus bstat = null; bstat = batch.post(); if ( bstat.isError() ) { // Process batch failure } ...
BatchStatusCode,
CommandStatusCode,
CommandStatus,
FileListener,
FileType
void replaceFile(String name,
byte[] filebytes)
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters, or if the fileBytes parameter is null (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name does not exits
in the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
This method will fail if a file is a Read Only file.
(error:
CommandStatusCode.CMD_ERROR_WRITE)
The batch containing a call to this method will fail if the specified
file is a JAR file containing custom extension classes and the extension
configuration is invalid as a result of the replacement file contents
specified in the parameters to this call (error:
BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)
name - A name that uniquely identifies the file to replace. This
value must be specified and cannot be null.filebytes - A byte array that contains the entire contents of the
file being added to the system. The size of the byte
array (and, therefore, of the file) is limited to
Integer.MAX_VALUE
(2,147,483,647) bytes.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWN
byte[] newBytes = null;
// See comments under
// addFile()
// for a Java code example of how to extract the file contents into a
// byte array (newBytes)
...
Batch batch = conn.newBatch();
batch.replaceFile("gold.cm", newBytes);
BatchStatus bstat = null;
bstat = batch.post();
if ( bstat.isError() )
{
// process batch error
}
...
BatchStatusCode,
CommandStatusCode,
CommandStatus,
FileListenervoid deleteFile(String name)
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name does not exits
in the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
This method will fail if a file with the specified file is related to
a Class of Service (error:
CommandStatusCode.CMD_ERROR_WRITE)
This method will fail if a file is a Read Only file.
(error:
CommandStatusCode.CMD_ERROR_WRITE)
The batch containing a call to this method will fail if the specified
file is a JAR file containing custom extension classes and the extension
configuration is invalid as a result of deleting the file (error:
BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)
name - A name that uniquely identifies the file to delete. This
value must be specified and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWNCommandStatusCode.CMD_ERROR_WRITE
...
Batch batch = conn.newBatch();
batch.deleteFile("gold.cm");
BatchStatus bstat = batch.post();
if ( bstat.isError() )
{
// Process batch error
}
...
BatchStatusCode,
CommandStatusCode,
CommandStatus,
FileListener
void getMatchingFilenames(FileSearchType searchType,
SearchBookmark sb,
int numberToReturn)
Call ((RecordSearchResults)CommandStatus.getData())
on the return from this method to retrieve the data.
The RecordSearchResults will
consist of the List FileName objects that match the specify file type
or file name criteria. If there is no record that match the search criteria,
the CommandStatus.DATA_RECORD_SEARCH_RESULTS will contain an empty List.
This method will fail if the searchType parameter is specified as null
or searchType is invalid (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the numberToReturn parameter is specified as
negative or 0.
(error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
searchType - the specific FileSearchType
over which the file name search will be performed.sb - The SearchBookmark from which to start the search.
If this is null, the search will begin from the first node matched.numberToReturn - Specify how many matching records to be returned from the
search query.
If the numberToReuturn is less than or equals 0 an error returned
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode#CMD_ERROR_FILE_TYPE_NOT_FOUND
CommandStatus.DATA_RECORD_SEARCH_RESULTS
...
// Create a new batch.
//
Batch batch = s_conn.newBatch();
// create the FileSearchType
FileSearchType fst =
FileSearchType.getFiles(new FileNamePattern("*.cm"));
// Perform a file name search across ALL
// FileTypes for files matching the name
// pattern "*.cm"
//
batch.getMatchingFilenames(fst, null, 100);
// Submit the batch.
//
BatchStatus bstat = batch.post();
// Process the result.
//
if (bstat.isError())
{
//Process batch error.
}
else
{
// Get the list of matching file names
// from the command status.
//
CommandStatus cstat = bstat.getCommandStatus(0);
RecordSearchResults results = (RecordSearchResults)cstat.getData();
List matchingFilenames = (List)results.getRecordData();
}
...
CommandStatusCode,
CommandStatus,
FileSearchTypevoid getProvGroupDetails(String provGroupName)
This method will fail if the provGroupName parameter is null or contains only
whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a provision group with the specified name
does not exist in the system (error:
CommandStatusCode.CMD_ERROR_QUERY)
provGroupName - A name that uniquely identifies the name of provision
group. This value must be specified and cannot be null.
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.getProvGroupDetails("default");
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
BatchStatusCode,
CommandStatusCode,
CommandStatus
void addCustomPropertyDefinition(String customPropertyName,
DataType customPropertyDataType)
A custom property must be added to BPR, before it may be used in a propeties Map as a parameter to a provisioning API method. Including properties which have not been previously declared will result in command failure at the validation stage.
This method will fail if the customPropertyName parameter or the
customPropertyDataType parameter is null (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if an attempt is made to define a custom property
name that corresponds exactly to the name of one of the pre-defined BPR
property names (error:
CommandStatusCode.CMD_ERROR_SYSTEM_PROPERTY_REDEFINITION)
This method will fail if an attempt is made to redefine an existing
custom property name (error:
CommandStatusCode.CMD_ERROR_CUSTOM_PROPERTY_REDEFINITION)
This method will fail if the customPropertyDataType parameter
specified is of type DataType.MAP or
DataType.LIST or DataType.LEASE_RESULTS or DataType.SNMPVAR_LIST as these data types are not supported for
custom properties (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
customPropertyName - The name of the custom property being
defined,
e.g. /com/mycompany/property1.
This value is required and cannot be null.customPropertyDataType - The data type of the data which will
be stored in association with the custom
property name, e.g.
DataType.INTEGER.
This value is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_SYSTEM_PROPERTY_REDEFINITION
...
Batch batch = conn.newBatch();
batch.addCustomPropertyDefinition(
"/com/mycompany/property1", DataType.STRING);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
DataType,
CommandStatusCodevoid removeCustomPropertyDefinition(String removeCustomPropertyName)
Note: removing a custom property from BPR does not remove corresponding property key/value pairs from devices stored in BPR.
This method will fail if the removeCustomPropertyName parameter is
null or contains only whitespace (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if an attempt is made to remove a custom property
name that has not been previously defined or if the specified property
is a pre-defined BPR property name (error :
CommandStatusCode.CMD_ERROR_CUSTOM_PROPERTY_UNKNOWN)
removeCustomPropertyName - The name of the custom property
definition to be removed from BPR.
...
Batch batch = conn.newBatch();
batch.removeCustomPropertyDefinition("/com/mycompany/property1");
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCodevoid getAllCustomPropertyDefinitions()
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the map of all custom property
definitions. If there is no custom definition currently defined in the
database, this method will returns an empty Map.
The map keys will be the custom property definition names, and the corresponding map values will give the expected DataType for each custom property. If no custom property definitions are found, null will be returned.
...
Batch batch = conn.newBatch();
batch.getAllCustomPropertyDefinitions();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
DataType,
CommandStatusCode,
CommandStatus,
Mapvoid getAllSystemPropertyDefinitions()
Call ((Map)CommandStatus.getData()) on the
return from this method to retrieve the data. If there is no
pre-defined property definitions, an empty Map will be returned.
The map keys will be the property definition names, and the corresponding map values will give the expected DataType for each pre-defined property.
...
Batch batch = conn.newBatch();
batch.getAllSystemPropertyDefinitions();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
DataType,
CommandStatusCode,
CommandStatus,
Mapvoid addLicenseKey(byte[] licenseFileContent)
Since the encrypted key contains all of the information pertinent to the key, no other parameters are required to call this method.
This method will fail if the licenseFileContent parameter consists
entirely of whitespace characters, has no content, is filled with random
characters, or the originating license file has been altered.
(error:
CommandStatusCode.CMD_ERROR_LICENSE_IS_INVALID)
This method will fail if the licenseFileContent parameter is null
(error:
CommandStatusCode.CMD_ERROR_LICENSE_IS_NULL)
This method will fail if the license key type of the licenseFileContent
parameter is not permanent or evaluation (error:
CommandStatusCode.CMD_ERROR_LICENSE_IS_NOT_PERM_OR_EVAL)
This method will fail if the licenseFileContent parameter is for an unknown
technology type (error:
CommandStatusCode.CMD_ERROR_UNKNOWN_TECHNOLOGY_NAME)
This method will fail if the licenseFileContent parameter is for an evaluation
license that has already expired (error:
CommandStatusCode.CMD_ERROR_EVALUATION_HAS_EXPIRED)
This method will fail if the licenseFileContent is an evaluation license and
there is an existing permanent license for the same technology (error:
CommandStatusCode.CMD_ERROR_EVAL_LICENSE_REPLACING_EXISTING_PERM_LICENSE)
This method will fail if the licenseFileContent parameter has already been
added to the database (error:
CommandStatusCode.CMD_ERROR_PERM_OR_EVAL_LICENSE_KEY_ALREADY_EXISTS)
*
This method will fail if the serial number of the licenseFileContent parameter has already been
added to the database (error:
CommandStatusCode.CMD_ERROR_LICENSE_SERIAL_NUMBER_USED)
This method will fail if the licenseFileContent parameter represents an
evaluation license and the expiration date of the license is less than
that of the license already in the databae (error:
CommandStatusCode.CMD_ERROR_EVAL_LICENSE_EXPIRATION_DATE_IS_LESS_THAN_EXISTING_EVAL_LICENSE_EXPIRATION_DATE)
licenseFileContent - the encrypted license key string supplied to the
customer. This parameter is required and cannot
be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_LICENSE_IS_INVALID)CommandStatusCode.CMD_ERROR_LICENSE_IS_NULLCommandStatusCode.CMD_ERROR_LICENSE_IS_NOT_PERM_OR_EVAL
CommandStatusCode.CMD_ERROR_UNKNOWN_TECHNOLOGY_NAMECommandStatusCode.CMD_ERROR_EVALUATION_HAS_EXPIREDCommandStatusCode.CMD_ERROR_PERM_OR_EVAL_LICENSE_KEY_ALREADY_EXISTS
CommandStatusCode.CMD_ERROR_LICENSE_SERIAL_NUMBER_USED
CommandStatusCode.CMD_ERROR_EVAL_LICENSE_REPLACING_EXISTING_PERM_LICENSE
CommandStatusCode.CMD_ERROR_EVAL_LICENSE_EXPIRATION_DATE_IS_LESS_THAN_EXISTING_EVAL_LICENSE_EXPIRATION_DATE
after conversion of the license file content to a byte array "licenseFileContent"
Batch batch = conn.newBatch();
batch.addLicenseKey(licenseFileContent);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCodevoid getLicenseKeyData()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The list will contain
maps of expanded license key data for all licenses which have been
added to BPR.
License key Maps will contain the following data:
/encryptedKey Map (contains license key serial number and license key itself)
/isPermanent Boolean
/technology String (e.g. DOCSIS, Computer, PacketCable, etc.)
/numSubscribers Integer # of subscribers this license supports
/description String
/dateInstalled Long result of Date.getTime().
/dateExpires Long result of Date.getTime(), or -1 if key is
permanent
GenericObjectKeys.OID_REVISION_NUMBERLicenseDataKeys
for more details
...
Batch batch = conn.newBatch();
batch.getLicenseKeyData();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
List,
Mapvoid deleteLicenseKey(String serialNumber)
Since the encrypted key contains all of the information pertinent to the key, no other parameters are required to call this method.
This method will fail if the SerialNumber parameter is null
(error:
CommandStatusCode.CMD_ERROR_LICENSE_IS_NULL)
This method will fail if a license with the input SerialNumber parameter
doesn't exist in the data store (error:
CommandStatusCode.CMD_ERROR_LICENSE_KEY_DOES_NOT_EXIST)
This method will fail if the deletion of the license represented by the
SerialNumber parameter will bring the number of properly licensed devices
below the number of devices already provisioned in the system's database.
CommandStatusCode.CMD_ERROR_LICENSE_NUM_DEVICE_CONSTRAINT)
This methos will fail if a non admin user attempt to delete the license
key.
CommandStatusCode.CMD_ERROR_NONADMIN_USER_ATTEMPTS_DELETE_LICENSE_KEY)
serialNumber - the unique identifier of the license key that is
to be deleted. This parameter is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_LICENSE_IS_NULLCommandStatusCode.CMD_ERROR_LICENSE_KEY_DOES_NOT_EXIST
CommandStatusCode.CMD_ERROR_LICENSE_NUM_DEVICE_CONSTRAINT
CommandStatusCode.CMD_ERROR_NONADMIN_USER_ATTEMPTS_DELETE_LICENSE_KEY
...
String technology = "DOCSIS";
String serialNumber = "abcde123456";
Batch batch = conn.newBatch();
batch.deleteLicenseKey(serialNumber);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCodevoid enablePublishingPlugin(String pluginClassname)
Users place publishing plugin classfiles in a well-known directory [locaton: BPR_HOME/rdu/classes] on the RDU server. At start-up time, the RDU loads (and enables) all publishing plugins that are found in that directory. This method supports re-enabling a publishing plugin which has been disabled after RDU start-up time.
This method will fail if the pluginClassname parameters is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if there was an error enabling the specified
plugin (error:
CommandStatusCode.CMD_ERROR_ENABLE_PLUGIN)
pluginClassname - the classname of the plugin to be enabled.
This parameters is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ENABLE_PLUGIN
...
String pluginName = new String("LDAPPublisher");
Batch batch = conn.newBatch();
batch.enablePublishingPlugin(pluginName);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
void disablePublishingPlugin(String pluginClassname)
Users place publishing plugin classfiles in a well-known directory [locaton: BPR_HOME/rdu/classes] on the RDU server. At start-up time, the RDU loads (and enables) all publishing plugins that are found in that directory. This method supports disabling a publishing plugin after RDU start-up time.
This method will fail if the pluginClassname parameters is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if there was an error disabling the specified
plugin (error:
CommandStatusCode.CMD_ERROR_DISABLE_PLUGIN)
pluginClassname - the classname of the plugin to be disabled.
This parameters is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_DISABLE_PLUGIN
...
String pluginName = new String("LDAPPublisher");
Batch batch = conn.newBatch();
batch.disablePublishingPlugin(pluginName);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
void getPublishingPlugins()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The list entries are
colon-delimited strings, containing the pluginClassname, and the
enabled/disabled status of that plugin.
For example:
com.myorg.publisingplugin1.class:enabled
com.myorg.publisingplugin2.class:disabled
...
Only classfiles currently residing in the well-known publishing plugin directory on the RDU server [location: BPR_HOME/rdu/classes] will appear in the list.
...
Batch batch = conn.newBatch();
batch.getPublishingPlugins();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
List
void addUser(String userId,
String password,
Map<String,Object> properties)
This method will fail if either the userId or password parameter is
null or is an empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the length of the password parameters is less
than 8, (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the properties specified in the
properties parameter are relevant properties for the
specified user but the property value is null or data type is
invalid. (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the userId parameter already exists (error:
CommandStatusCode.CMD_ERROR_USER_ALREADY_EXISTS)
This method will fail if the userId parameter specified is the admin
user (error:
CommandStatusCode.CMD_ERROR_USER_ADMIN)
This method will fail if the properties parameter is null or doesn't
contain the user's role.
(error:
CommandStatusCode.CMD_ERROR_USER_ROLE_UNSPECIFIED)
Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus this method will fail when using clients older than 2.7, even when logged in as the admin user.
userId - String to identify the user to be added. This value is
required and cannot be null.password - String indicating the user password. This value is
required and cannot be null.properties - Map to identify the various user properties like
user role, description and date when user was created.
This parameter is required and cannot be null; and it
must contain the user's role.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_USER_ALREADY_EXISTSCommandStatusCode.CMD_ERROR_USER_ADMINCommandStatusCode.CMD_ERROR_USER_ROLE_UNSPECIFIED
...
String userId = "john";
String password = "testpassword";
Map prop = new HashMap();
prop.put (UserDetailsKeys.USER_ISREADONLY, Boolean.TRUE);
Batch batch = conn.newBatch();
batch.addUser(userId,password,prop);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
UserDetailsKeysvoid deleteUser(String userId)
This method will fail if the userId parameter is null or if it is
an empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the user specified by the userId parameter
does not exist (error:
CommandStatusCode.CMD_ERROR_USER_UNKNOWN)
This method will fail if the user specified by the userId parameter
is the admin user (error:
CommandStatusCode.CMD_ERROR_USER_ADMIN)
Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus this method will fail when using clients older than 2.7, even when logged in as the admin user.
userId - String uniquely identifying the userId to delete.
This value is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_USER_UNKNOWNCommandStatusCode.CMD_ERROR_USER_ADMIN
...
String userId = "user1";
Batch batch = conn.newBatch();
batch.deleteUser(userId);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
UserDetailsKeys,
Map
void changeUser(String userId,
String password,
Map<String,Object> properties)
This method will fail if either the userId or password parameters is
null or an empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the length of the password parameters is less
than 8, (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the properties parameter is not null and
it contains keys that are not relevant to users or key value is
null or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the user specified by the userId parameter
does not exist (error:
CommandStatusCode.CMD_ERROR_USER_UNKNOWN)
This method will fail if the user specified by the userId parameter
is the admin user (error:
CommandStatusCode.CMD_ERROR_USER_ADMIN)
Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus when chaning other user's data, this method will fail when using clients older than 2.7, even when logged in as the admin user.
userId - String uniquely identifying the user.
This value is required and cannot be null.password - the new password of the user. Calling this method
chagnes the password. If the password should not be
changed, enter the current password.
This value is required and cannot be null.properties - Map identifying the various properties that can be
modified.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_USER_UNKNOWNCommandStatusCode.CMD_ERROR_USER_ADMIN
...
String userId = "user1";
String password = "password";
Map prop = new HashMap();
prop.put(UserDetailsKeys.USER_DESCRIPTION, "User1 description");
Batch batch = conn.newBatch();
batch.changeUser(userId,password, prop);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
UserDetailsKeys,
Mapvoid getAllUsers()
The administrator will be listed as one of the users. However, this user cannot be modified or deleted.
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will consist
of String that is the users exist in the database. If there is
no user exists in the database, an empty List will be returned.
...
Batch batch = conn.newBatch();
batch.getAllUsers();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
UserDetailsKeys,
CommandStatusCode,
CommandStatus,
Listvoid getUserDetails(String userId)
Call ((Map)CommandStatus.getData()) on
the return from this method to retrieve the data. The map will contain
properties and values for the specified user.
This method will fail if the userId parameter is null or is an
empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the user specified by the userId parameter
does not exist (error:
CommandStatusCode.CMD_ERROR_USER_UNKNOWN)
userId - The userId whose details are required.
GenericObjectKeys.OID_REVISION_NUMBERUserDetailsKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_USER_UNKNOWN
...
String userId = "user1";
Batch batch = conn.newBatch();
batch.getUserDetails(userId);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
UserDetailsKeys,
Mapvoid getPublishingPluginSettings(String plugin_name)
Call ((Map)CommandStatus.getData()) on
the return from this method to retrieve the data. The map will contain
properties and values for the specified publishing plugin.
This method will fail if the plugin_name parameter is null or is an
empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified plugin was not found (error:
CommandStatusCode.CMD_ERROR_PLUGIN_UNKNOWN)
plugin_name - The plugin_name to retrieve the defaults for.
This value is required and cannot be null.
PublishDetailsKeys.PUBLISH_USERIDPublishDetailsKeys.PUBLISH_USERPASSWORDPublishDetailsKeys.PUBLISH_SERVERPublishDetailsKeys.PUBLISH_PORTPublishDetailsKeys.PUBLISH_IPADDRESS
...
String plugin_name = "LDAPPublisher";
Batch batch = conn.newBatch();
batch.getPublishingPluginSettings(plugin_name);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
PublishDetailsKeys
void changePublishingPluginSettings(String plugin_name,
Map<String,Object> properties,
List<String> propertyRemoves)
This method will fail if the plugin_name parameter is null or is an
empty string (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the properties parameter is not null and
it contains keys that are not relevant to publishing plugins or
the key value is null or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified plugin was not found (error:
CommandStatusCode.CMD_ERROR_PLUGIN_UNKNOWN)
plugin_name - The plugin_name to retrieve the defaults for.
This value is required and cannot be null.properties - The map of publishing plugin properties to add/change.
If a property already exists, the old value will be
replaced with the new value.
If no properties are being added/modified, pass null.propertyRemoves - The list of publishing plugin properties to
remove. If no properties are being removed,
pass null.
PublishDetailsKeys.PUBLISH_USERIDPublishDetailsKeys.PUBLISH_USERPASSWORDPublishDetailsKeys.PUBLISH_SERVERPublishDetailsKeys.PUBLISH_PORTPublishDetailsKeys.PUBLISH_IPADDRESS
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_PLUGIN_UNKNOWN
String plugin_name = new String("LDAPPublisher");
List removes = new ArrayList();
Map map = new HashMap();
map.put(PublishDetailsKeys.PUBLISH_USERID, "userid");
map.put(PublishDetailsKeys.PUBLISH_USERPASSWORD, "password");
map.put(PublishDetailsKeys.PUBLISH_SERVER, "server");
map.put(PublishDetailsKeys.PUBLISH_PORT, new Integer(2001));
map.put(PublishDetailsKeys.PUBLISH_IPADDRESS, "1.2.2.4");
Batch batch = conn.newBatch();
batch.changePublishingPluginSettings(plugin_name, map, removes);
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
PublishDetailsKeysvoid deleteProvisioningGroup(String provGroupName)
This method will fail if the provGroup parameter is null or contains
only whitespace (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified provisioning group is unknown
(error:
CommandStatusCode.CMD_ERROR_PROV_GROUP_UNKNOWN)
This method will fail of the specified provisioning group is in use
by any DPEs (primary or secondary provisioning groups) or by a Network
Registrar extension point or if there are any devices that are in the
specified provisioning group (error:
CommandStatusCode.CMD_ERROR_PROV_GROUP_HAS_RELATED_ENTITIES)
provGroupName - Name of the provisioning group to delete.
The value is required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_PROV_GROUP_UNKNOWNCommandStatusCode.CMD_ERROR_PROV_GROUP_HAS_RELATED_ENTITIES
...
Batch batch = conn.newBatch();
batch.deleteProvisioningGroup("dallas-prov-group");
status = batch.post();
if ( status.isError() )
{
//process error
}
...
CommandStatusCode,
CommandStatusvoid getAllFileTypes()
FileType objects in the database.
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The list will consist
FileType objects in the database. If there is
no FileType exists in the database, an empty List will be returned.
CommandStatus.DATA_LIST
...
Batch batch = conn.newBatch();
batch.getAllFileTypes();
BatchStatus status = batch.post();
if ( status.isError() )
{
fail(status);
}
else
{
pass(status);
}
...
CommandStatusCode,
CommandStatus,
Listvoid getAllLicenseInfo()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will contain
a Map of enabled technlogies based on all the licenses which have been
added to the system. If there is no lincense exists in the database, an
empty List will be returned.
License key Maps will contain the following data:
/enabledTechnologiesList ArrayList
GenericObjectKeys.OID_REVISION_NUMBERAllLicenseInfoKeys
for more details
...
Batch batch = conn.newBatch();
batch.getAllLicenseInfo();
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCode,
CommandStatus,
List,
Mapvoid getFileBytes(String name)
Call ((byte[])CommandStatus.getData()) on
the return from this method to retrieve the byte array that is the
contents of the desired file.
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name does not exits
in the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
name - A name that uniquely identifies the file to get. This
value must be specified and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR__FILE_UNKNOWN
...
Batch batch = conn.newBatch();
batch.getFileBytes("gold.cm");
BatchStatus bstat = null;
bstat = batch.post();
if ( bstat.isError() )
{
//Process batch error
}
else
{
CommandStatus cstat = bstat.getCommandStatus(0);
byte[] bytes = (byte[])cstat.getData();
//save the contents of the byte array into a file :
String pathnamestring = "/tmp/destFilename.cm";
File f = new File(pathnamestring);
FileOutputStream fos = null;
try
{
fos = new FileOutputStream(f);
fos.write( bytes );
fos.close();
}
catch (IOException ex)
{
// Do exception processing here
}
}
...
CommandStatusCode,
CommandStatusvoid getFileProperties(String name)
Call ((byte[])CommandStatus.getData()) on
the return from this method to retrieve the Map that contains
properties of the desired file.
This method will fail if the name parameter is null or contains only
whitespace characters, or if the specified file name contains invalid
characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if a file with the specified name does not exits
in the system (error:
CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)
name - A name that uniquely identifies the file to get. This
value must be specified and cannot be null.
GenericObjectKeys.OID_REVISION_NUMBERFileKeys.FILE_DESCRIPTIONFileKeys.FILE_TYPEFileKeys.READONLY_ACCESSFileKeys.RELATED_FILE_LISTFileKeys.COS_LISTFileKeys for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_FILE_UNKNOWN
...
Batch batch = conn.newBatch();
batch.getFileProperties("gold.cm");
BatchStatus bstat = null;
bstat = batch.post();
if ( bstat.isError() )
{
//Process batch error
}
{
commandStatus = bstat.getCommandStatus(0);
Map resultMap = (Map) commandStatus.getData();
Iterator keys = resultMap.keySet().iterator();
System.out.println("Properties for File");
while (keys.hasNext())
{
String key = (String)keys.next();
System.out.println(key +": " +resultMap.get(key));
}
}
...
CommandStatusCode,
CommandStatus
void addDHCPCriteria(String criteriaName,
String clientClass,
String includeSelectionTags,
String excludeSelectionTags,
Map<String,Object> properties)
This method will fail if the criteriaName parameter is null, contains
only whitespace characters, or it starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the clientClass, includeSelectionTags, and
excludeSelectionTags parameters are all null (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the properties map is not null and contains
keys that are not relevant to DHCP criteria or keys value is null
or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fails if a dhcp criteria with the specified name
already existis (error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_EXISTS)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria. This value is required and
cannot be null.clientClass - The client class for Network Registrar to use
to select an IP address for a modem or MTA.
This value is required if both includeSelectionTags
and excludeSelectionTags are null.includeSelectionTags - A comma separated list of Network Registrar
selection tags for Network Registrar to use
to select an IP address for a modem or MTA.
This value is required if both clientClass
and excludeSelectionTags are null.excludeSelectionTags - A comma separated list of Network Registrar
selection tags for Network Registrar to use
to select an IP address for a modem or MTA.
This value is required if both clientClass
and includeSelectionTags are null.properties - A map of additional attributes for this DHCP Scope
Selection Criteria. If not used, pass null.
Configuration.addClassOfService
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_EXISTS
...
Batch batch;
Configuration prov;
BatchStatus status;
batch = conn.newBatch();
batch.addDHCPCriteria("Provisioned","dhcpCriteria", "selTag1",
"selTag2",null);
status = batch.post();
if ( status.isError() )
{
// Process batch failure
}
...
CommandStatusCode,
DHCPCriteriaDetailsKeysvoid deleteDHCPCriteria(String criteriaName)
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
This method will fail if there are any devices using the specified
DHCP criteria (error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_RELATED_TO_IPDEVICE)
This method will fail if the specified DHCP criteria is the default
DHCP criteria or CPE DHCP criteria for a technology (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria to delete. This value is
required and cannot be null.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWNCommandStatusCode.CMD_ERROR_DHCP_CRITERIA_RELATED_TO_IPDEVICE
...
Batch batch;
Configuration prov;
BatchStatus status;
batch = conn.newBatch();
batch.deleteDHCPCriteria("TestCriteria");
status = batch.post();
if ( status.isError() )
{
// Process batch error
}
...
CommandStatusCode,
CommandStatus
void changeDHCPCriteriaClientClass(String criteriaName,
String newClientClass)
Note: This command, if successful, will contact the
Configuration Regeneration Service and regenerate all the
devices assigned the DHCP criteria that was changed
with this command. The command will return immediately
with BatchStatusCode.BATCH_WARNING. CRS will fire
a CRSCompleteListener.CRS_COMPLETED event once it
has completed regenerating the configuration for all
devices with the changed DHCP criteria.
Note: Changes a DHCP Scope Selection Criteria's client class in a DHCP criteria once the DHCP Criteria was assigned to devices, in some cases, might cause the subsequent IP reservations in IPDevice.changeProperties(...) and/or IPDevice.changeMACAddress(...) to fail for all the devices with the changed DHCP criteria. Caution should be taken to make sure the new client class falls into the same DHCP scope as the previously assigned client class to avoid IP reservation failures.
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the newClientClass parameter is not null and
contains non-ASCII characters or whitespace characters (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
This method will fail if the newClientClass parameter is null and the
include selection tags and exclude selection tags are also null (error:
CommandStatusCode.CMD_ERROR_WRITE)
criteriaName - A string that uniquely identifies a DHCP Scope
Selection Criteria. This value is required and
cannot be null.newClientClass - The new client class for the DHCP Criteria.
This value is required if both include selection
tags and exclude selection tags values are null.
Otherwise this value is optional.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWNCommandStatusCode.CMD_ERROR_WRITE
...
Batch batch = conn.newBatch();
batch.changeDHCPCriteriaClientClass(
"TestCriteria", "testClientClass");
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCode
void changeDHCPCriteriaExcludeSelectionTags(String criteriaName,
String newExcludeSelectionTags)
Note: This command, if successful, will contact the
Configuration Regeneration Service and regenerate all the
devices assigned the DHCP criteria that was changed
with this command. The command will return immediately
with BatchStatusCode.BATCH_WARNING. CRS will fire
a CRSCompleteListener.CRS_COMPLETED event once it
has completed regenerating the configuration for all
devices with the changed DHCP criteria.
Note: The use of selection-criteria exclusion tags is not allowed when adding a IP reservation. Selection-criteria exclusion tags will not be considered during IP reservation.
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the newExcludeSelectionTags parameter is not
null and contains non-ASCII characters or whitespace characters (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
This method will fail if the newExcludeSelectionTags parameter is null
and the include selection tags and client class parameters are also null
(error:
CommandStatusCode.CMD_ERROR_WRITE)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria. This value is required and
cannot be null.newExcludeSelectionTags - The new exclude selection tags for the
DHCP Criteria. This parameter is
required and must be specified if both
client class and include selection tags
are null. Otherwise, this value is
optional.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWNCommandStatusCode.CMD_ERROR_WRITE
...
Batch batch = conn.newBatch();
batch.changeDHCPCriteriaExcludeSelectionTags(
"TestCriteria", "testExcludeSelectionTag");
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCode
void changeDHCPCriteriaIncludeSelectionTags(String criteriaName,
String newIncludeSelectionTags)
Note: This command, if successful, will contact the
Configuration Regeneration Service and regenerate all the
devices assigned the DHCP criteria that was changed
with this command. The command will return immediately
with BatchStatusCode.BATCH_WARNING. CRS will fire
a CRSCompleteListener.CRS_COMPLETED event once it
has completed regenerating the configuration for all
devices with the changed DHCP criteria.
Note: Changes a DHCP Scope Selection Criteria's Include Selection Tags in a DHCP criteria once the DHCP Criteria was assigned to devices, in some cases, might cause the subsequent IP reservations in IPDevice.changeProperties(...) and/or IPDevice.changeMACAddress(...) to fail for all the devices with the changed DHCP criteria. Caution should be taken to make sure the new Include Selection Tags falls into the same DHCP scope as the previously assigned Include Selection Tag to avoid IP reservation failures.
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the newIncludeSelectionTags parameter is not
null and contains non-ASCII characters or whitespace characters (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
This method will fail if the newIncludeSelectionTags parameter is null
and the include selection tags and client class parameters are also null
(error:
CommandStatusCode.CMD_ERROR_WRITE)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria. This value is required and
cannot be null.newIncludeSelectionTags - The new include selection tags for the
DHCP Criteria. This value is required
if both client class and exclude
selection tags are null. Otherwise it
is an optional parameter.
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWNCommandStatusCode.CMD_ERROR_WRITE
...
Batch batch = conn.newBatch();
batch.changeDHCPCriteriaIncludeSelectionTags(
"TestCriteria", "testIncludeSelectionTag");
BatchStatus status = batch.post();
if ( status.isError() )
{
//Process batch error
}
...
CommandStatusCode
void changeDHCPCriteriaProperties(String criteriaName,
Map<String,Object> properties,
List<String> propertyRemoves)
Note: This command, if successful, will contact the
Configuration Regeneration Service and regenerate all the
devices assigned the DHCP criteria that was changed
with this command. The command will return immediately
with BatchStatusCode.BATCH_WARNING. CRS will fire
a CRSCompleteListener.CRS_COMPLETED event once it
has completed regenerating the configuration for all
devices with the changed DHCP criteria.
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the properties map is not null and contains
keys that are not relevant to DHCP criteria or key value is
null or data type is invalid (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the property specified in the properties
parameter also exist in propertyRemoves parameter.
(error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria. This value is required
and cannot be null.properties - A map of additional or changed attributes for this
DHCP Scope Selection Criteria. If there are no
properties to add or change, specify null.propertyRemoves - A list of property names to remove from this
DHCP Scope Selection Criteria. If there are no
properties to remove, specify null.
Configuration.changeClassOfServiceProperties
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
Map propAdd = new HashMap();
List propRemoves = null;
// TEST_CUSTOM_PROP has to be added as a custom property before
// making this call.
propAdd.put("TEST_CUSTOM_PROP", "test");
batch.changeDHCPCriteriaProperties("TestCriteria",
propAdd,
propRemoves);
status = batch.post();
if ( status.isError() )
{
//Process batch failure
}
...
CommandStatusCodevoid getDHCPCriteriaDetails(String criteriaName)
This method will fail if the criteriaName parameter is null or
contains only whitespace characters (error:
CommandStatusCode.CMD_ERROR_VALIDATE)
This method will fail if the criteriaName parameter starts with the
TechnologyDefaultsKeys.DEFAULT_PREFIX value (error:
CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)
This method will fail if the specified DHCP criteria does not exist
(error:
CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)
criteriaName - A string that uniquely identifies this DHCP Scope
Selection Criteria. This value is required and
cannot be null.
GenericObjectKeys.OID_REVISION_NUMBERDHCPCriteriaDetailsKeys
for more details
CommandStatusCode.CMD_OKCommandStatusCode.CMD_ERROR_VALIDATECommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUECommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.getDHCPCriteriaDetails("TestCriteria");
status = batch.post();
if ( status.isError() )
{
// process error
}
...
Map,
CommandStatusCode,
DHCPCriteriaDetailsKeys,
CommandStatusvoid getAllDHCPCriterias()
Call ((List)CommandStatus.getData()) on
the return from this method to retrieve the data. The List will
consist of the String that are the names DHCP Scope
Selection Criteria present in the system. If there is no DHCP Scope
Selection Criteria present in the system, an empty list will be returned.
...
Batch batch;
BatchStatus status;
batch = conn.newBatch();
batch.getAllDHCPCriterias();
status = batch.post();
if ( status.isError() )
{
// Process batch failure
}
....
CommandStatusCode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||