Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titleNote!

These functions can be used to interact with the PCC provisioning interface from APL.

pccGetData

Retrieves a specific UDR from the provisioning interface based on the stated UDR type and key.

Code Block
drudr pccGetData( string typename, string key )

Parameters

ParameterDescription

typename

The fully qualified typename of the requested UDR. For information about available UDR types, see APL - PCC Provisioning Plugins (3.1).

key

The unique identifier of the requested UDR.

Returns:

The matching UDR or null, if no matching UDR was found.


...

Info
titleExample
drudr notification = pccGetData
("PCC.Routing.Provisioning.Routing_Details", "3");

will retrieve a UDR of the type PCC.Routing.Provisioning.Routing_Details with the key 3 .

pccListData

Retrieves a list with all the UDRs from the provisioning interface with the stated UDR type.

Code Block
list<drudr> pccListData( string  typename  )

Parameters

ParameterDescription

typename

The fully qualified typename of the requested UDRs. For information about available UDR types, see APL - PCC Provisioning Plugins (3.1).

Returns:

A list containing all the UDRs of the requested type.

...

Info
titleExample


Code Block
list<drudr> notificationsList = pccListData
("PCC.Routing.Provisioning.Routing_Details");

will return a list named notificationsList with all the UDRs that have the type PCC.Routing.Provisioning.Routing_Details .

pccCreateData

This function inserts a new UDR through the provisioning interface.

Code Block
drudr pccCreateData( drudr  udr  )

Parameters

ParameterDescription

udr

The new UDR to insert. For information about available UDR types, see APL - PCC Provisioning Plugins (3.1).

Returns:

The created UDR or null if there was an error.

...

Info
titleExample


Code Block
drudr created = pccCreateData(input);

will insert a new UDR named created through the provisioning interface.

pccUpdateData

This function updates a UDR through the provisioning interface.

Code Block
drudr pccUpdateData( drudr  udr  )

Parameters

ParameterDescription

udr

The UDR to update. For information about available UDR types, seeĀ APL - PCC Provisioning Plugins (3.1).

Returns:

The updated UDR, specified in the argument, or null if there was an error.

...

Info
titleExample


Code Block
drudr udr = pccUpdateData(created);

will update the UDR named created through the provisioning interface.

pccDeleteData

This function deletes a UDR in the provisioning interface

Code Block
drudr pccDeleteData( drudr  udr  )

Parameters

ParameterDescription

udr

The UDR to delete. For information about available UDR types, seeĀ APL - PCC Provisioning Plugins (3.1).

Returns:

The deleted UDR, specified by the argument, or null if there was an error.

...

Info
titleExample


Code Block
drudr udr = pccDeleteData(created);

will delete the UDR named created through the provisioning interface.

pccLastErrorCode

If any of the create, delete or update operations should fail, the error code can be retrieved with this method.

...

Info
titleExample


Code Block
int errorCode = pccLastErrorCode();

will return 500.

pccLastErrorMessage

If any of the create, delete or update operations should fail, a more detailed description of the error can be retrieved with this method.

Code Block
string pccLastErrorMessage()

Parameters

ParameterDescription

Returns:

A description of the last error.

...

Info
titleExample

If the last error code was 500,

Code Block
string errorMsg = pccLastErrorMessage();

will return a description of error code 500 e g Failed to verify Couchbase.

pccSetProvisioningArea

Sets a provisioning working area for the workflow. There are two areas available, TEST and PROD.

Code Block
void pccSetProvisioningArea( string  area  )

Parameters

ParameterDescription

area

The name of the area to work against. All delete, update, get and create operations will use this area. Must be one of the either TEST or PROD.

...

Info
titleExample


Code Block
pccSetProvisioningArea("TEST");

will set area TEST as working area for the workflow.

pccGetProvisioningArea

Retrieves the currently active area for the workflow.

Code Block
string pccGetProvisioningArea()

Parameters

ParameterDescription

Returns:

The name of the currently active provisioning area.

...

Info
titleExample

If the currently active area for the workflow is TEST,

Code Block
string area = pccGetProvisioningArea();

will return "TEST".

pccCopyAreaData

Copies configurations from one area to another.

...

Code Block
string pccCopyAreaData
                    ( string  source ,
                      string  destination ,
                      string  configurations  )

Parameters

ParameterDescription

source

The name of the source area.

destination

The name of the destination area.

configurations

The configurations that you want to copy, e g PCC (for all PCC configurations), PCC.Routing_Destination (for only Routing configurations), PCC.Use_Case (for only Use Case configurations), etc.

Returns:

Null if the command succeeded or the error message if there was an error.

...

Info
titleExample


Code Block
pccCopyAreaData("TEST","PROD","PCC.RoutingControl");

will copy all the provisioned RoutingControl data from the area TEST to the area PROD.

If you want to copy all PCC related data, you can enter ("TEST","PROD","PCC").

pccClearArea

Clears an area. All content in the area will be deleted.

Code Block
string pccClearArea( string  area  )

Parameters

ParameterDescription

area

The name of the area to clear.

Returns:

Null if the command succeeded or the error message if there was an error.

...