Cisco Systems, Inc.

com.cisco.scabb.servconf.mgmt
Class ServiceConfigApi

java.lang.Object
  extended by com.cisco.scabb.servconf.mgmt.ServiceConfigApi

public class ServiceConfigApi
extends java.lang.Object

ServiceConfigApi exposes Service Configuration API functions . All of these functions get/set data located in the SCE, therefore require being connected to the SCE device.

See Also:
SCABB

Method Summary
static long applyServiceConfiguration(ConnectionApi connectionApi, ServiceConfig servConf)
          Applies the Service Configuration to the sepecified SCE.
static long applyServiceConfiguration(ConnectionApi connectionApi, ServiceConfig servConf, boolean updateCm, java.util.Properties cmIpRemap, int cmUpdateMethod, boolean isPqbSaveReqd, int rpcPort, boolean forceTemplateVirtualLinksInVlMode)
           
static long applyServiceConfiguration(ConnectionApi connectionApi, ServiceConfig servConf, boolean updateCm, java.util.Properties cmIpRemap, int cmUpdateMethod, int rpcPort, boolean forceTemplateVirtualLinksInVlMode)
          Applies the Service Configuration to the sepecified SCE.
static long applyServiceConfiguration(ConnectionApi connectionApi, ServiceConfig servConf, byte applyFlag)
          Deprecated. use applyServiceConfiguration(ConnectionApi, ServiceConfig)instead
static long applyServiceConfiguration(ConnectionApi connectionApi, ServiceConfig servConf, java.util.Properties applySettings)
          Applies the Service Configuration to the sepecified SCE.
static void exportServConf(ServiceConfig servConf, java.io.File pqbfile)
          save a service configuration to a .pqb file
static ServiceConfig importDefaultServConf()
          Load the default Service Configuration
static ServiceConfig importServConf(java.io.File pqbfile)
          load service configuration from a .pqb file
static ServiceConfig retrieveServiceConfiguration(ConnectionApi connectionApi)
          Retrieving the Service Configuration.
static void updateValuesIni(java.lang.String cmAddress, java.lang.String sceAddress, ServiceConfig servConf)
          Updating the CM with the SCE device's service-configuration data (values ini).
static void updateValuesIni(java.lang.String cmAddress, java.lang.String sceAddress, ServiceConfig servConf, int cmUpdateMethod, int rpcPort)
          Updating the CM with the SCE device's service-configuration data (values ini).
static java.util.ArrayList validateServiceConfiguration(ServiceConfig servConf)
          Validates the given service-configuration
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

applyServiceConfiguration

public static long applyServiceConfiguration(ConnectionApi connectionApi,
                                             ServiceConfig servConf)
                                      throws ElementManagementException,
                                             ApplyException,
                                             IncompatibleLicenseException
Applies the Service Configuration to the sepecified SCE.

Parameters:
connectionApi - the ConnectionApi which keeps a handle to the connection to the SCE
servConf - the Service Configuration to apply
Returns:
the operation timestamp
Throws:
ElementManagementException
ApplyException
IncompatibleLicenseException

applyServiceConfiguration

public static long applyServiceConfiguration(ConnectionApi connectionApi,
                                             ServiceConfig servConf,
                                             java.util.Properties applySettings)
                                      throws ElementManagementException,
                                             ApplyException,
                                             IncompatibleLicenseException
Applies the Service Configuration to the sepecified SCE.

Parameters:
connectionApi - the ConnectionApi which keeps a handle to the connection to the SCE
servConf - the Service Configuration to apply
applySettings - Properties
Returns:
the operation timestamp
Throws:
ElementManagementException
ApplyException
IncompatibleLicenseException
See Also:
Properties

applyServiceConfiguration

public static long applyServiceConfiguration(ConnectionApi connectionApi,
                                             ServiceConfig servConf,
                                             boolean updateCm,
                                             java.util.Properties cmIpRemap,
                                             int cmUpdateMethod,
                                             int rpcPort,
                                             boolean forceTemplateVirtualLinksInVlMode)
                                      throws ElementManagementException,
                                             ApplyException,
                                             IncompatibleLicenseException
Applies the Service Configuration to the sepecified SCE.

Parameters:
connectionApi - the ConnectionApi which keeps a handle to the connection to the SCE
servConf - the Service Configuration to apply
updateCm - whether the Collection Manager for the specified SCE should be updated with the specified service configuration values
cmIpRemap - a map from CM IP address as configured in the SCE, to actual Collection Manager addresses
cmUpdateMethod - which method should be used to connect to the CM
rpcPort - port number for CM RPC connection
Returns:
the operation timestamp
Throws:
ElementManagementException
ApplyException
IncompatibleLicenseException
See Also:
PolicyAPI.DC_UPDATE_METHOD_RPC, PolicyAPI#DC_UPDATE_METHOD_SQL, PolicyAPI.DC_DEFAULT_RPC_PORT

applyServiceConfiguration

public static long applyServiceConfiguration(ConnectionApi connectionApi,
                                             ServiceConfig servConf,
                                             boolean updateCm,
                                             java.util.Properties cmIpRemap,
                                             int cmUpdateMethod,
                                             boolean isPqbSaveReqd,
                                             int rpcPort,
                                             boolean forceTemplateVirtualLinksInVlMode)
                                      throws ElementManagementException,
                                             ApplyException,
                                             IncompatibleLicenseException
Throws:
ElementManagementException
ApplyException
IncompatibleLicenseException

applyServiceConfiguration

public static long applyServiceConfiguration(ConnectionApi connectionApi,
                                             ServiceConfig servConf,
                                             byte applyFlag)
                                      throws ElementManagementException,
                                             ApplyException,
                                             IncompatibleLicenseException,
                                             java.io.IOException
Deprecated. use applyServiceConfiguration(ConnectionApi, ServiceConfig)instead

Applying the Service Configuration

Parameters:
connectionApi - the ConnectionApi which keeps a handle to the connection to the SCE
servConf - the Service Configuration to apply
applyFlag - the flag stating if the apply should overwrite previously applied Policies.
Returns:
the operation timestamp
Throws:
ElementManagementException
ApplyException
IncompatibleLicenseException
java.io.IOException
See Also:
Engage.APPLY_FLAG_OVERWRITE, Engage.APPLY_FLAG_NO_OVERWRITE

retrieveServiceConfiguration

public static ServiceConfig retrieveServiceConfiguration(ConnectionApi connectionApi)
                                                  throws java.io.IOException,
                                                         ElementManagementException,
                                                         ApplyException
Retrieving the Service Configuration.

Parameters:
connectionApi - the ConnectionApi which keeps a handle to the connection to the SCE
Returns:
the Service Configuration in the SCE device
Throws:
java.io.IOException
ElementManagementException
ApplyException

updateValuesIni

public static void updateValuesIni(java.lang.String cmAddress,
                                   java.lang.String sceAddress,
                                   ServiceConfig servConf)
                            throws ApplyException
Updating the CM with the SCE device's service-configuration data (values ini).

Parameters:
cmAddress - the address of the CM to update
sceAddress - the address of the SCE device which enforces the given Service Configuration
servConf - the Service Configuration
Throws:
ApplyException

updateValuesIni

public static void updateValuesIni(java.lang.String cmAddress,
                                   java.lang.String sceAddress,
                                   ServiceConfig servConf,
                                   int cmUpdateMethod,
                                   int rpcPort)
                            throws ApplyException
Updating the CM with the SCE device's service-configuration data (values ini).

Parameters:
cmAddress - the address of the CM to update
sceAddress - the address of the SCE device which enforces the given Service Configuration
servConf - the Service Configuration
cmUpdateMethod -
rpcPort -
Throws:
ApplyException

validateServiceConfiguration

public static java.util.ArrayList validateServiceConfiguration(ServiceConfig servConf)
Validates the given service-configuration

Parameters:
servConf - the Service Configuration to validate
Returns:
a Vector with warning messages regarding Rules which might have undesireable results
See Also:
PolicyValidator.validatePolicy(com.pcube.apps.engage.policy.Policy)

importServConf

public static ServiceConfig importServConf(java.io.File pqbfile)
                                    throws ImportExportException,
                                           java.io.IOException
load service configuration from a .pqb file

Parameters:
pqbfile - the .pqb file to load
Returns:
the resulting Service Configuration
Throws:
ImportExportException
java.io.IOException

exportServConf

public static void exportServConf(ServiceConfig servConf,
                                  java.io.File pqbfile)
                           throws java.io.FileNotFoundException,
                                  ImportExportException
save a service configuration to a .pqb file

Parameters:
servConf - the Service Configuration to save
pqbfile - the .pqb file to save the Service Configuration into
Throws:
java.io.FileNotFoundException
ImportExportException

importDefaultServConf

public static ServiceConfig importDefaultServConf()
                                           throws ImportExportException
Load the default Service Configuration

Returns:
the default service configuration
Throws:
ImportExportException

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.