/
Common APPC DB Queries Utilized

Common APPC DB Queries Utilized


VNF_DG_MAPPING

Verify that the Action is mapped to the correct Directed Graph (DG)

  • The actual DG is stored in the SVC_LOGIC table

  • The api_version, action from the request and the vnf_type obtained from A&AI will be used to select the correct DG from the VNF_DG_MAPPING table

VNF_DG_MAPPING List
select * from VNF_DG_MAPPING; Sample Results: +------------------+-------------+----------+-------------+------------------+------------+-----------+ | action | api_version | vnf_type | vnf_version | dg_name | dg_version | dg_module | +------------------+-------------+----------+-------------+------------------+------------+-----------+ | Restart | 2.00 | | | Generic_Restart | 3.0.0 | APPC | | Configure | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | ConfigModify | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Rebuild | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Restart | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | HealthCheck | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | StartApplication | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | StopApplication | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Migrate | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Snapshot | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | ConfigRestore | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | ConfigBackup | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Evacuate | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Stop | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Start | NULL | NULL | NULL | DGOrchestrator | 4.0.0 | APPC | | Rebuild | 2.01 | | | legacy_operation | 2.0.0.0 | APPC-API | +------------------+-------------+----------+-------------+------------------+------------+-----------+



If entries in the VMF_DG_MAPPING table are needed the following can serve as an example INSERT statement:

Inserting into VNF_DG_MAPPING Example:
INSERT INTO `VNF_DG_MAPPING` VALUES ('Configure',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('ConfigModify',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Rebuild',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Restart',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('HealthCheck',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('StartApplication',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('StopApplication',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Migrate',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Snapshot',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('ConfigRestore',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('ConfigBackup',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Evacuate',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Stop',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'), ('Start',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC');

SVC_LOGIC

The SVC_LOGIC table stores the DGs

  • The DG Loader process loads all DGs contained in the APPC Gerrit Project: appc-directed-graph/appc-dgraph/provider/src/main/resources/json

SVC_LOGIC List
select module, rpc, version, mode, active from SVC_LOGIC; Sample Results: +----------+------------------------------------+----------------+------+--------+ | module | rpc | version | mode | active | +----------+------------------------------------+----------------+------+--------+ | APPC | ansible-adapter-1.0 | 2.0.1 | sync | Y | | APPC | Check-Active_VNFC_vSCP | 2.0.0 | sync | Y | | APPC | CheckConfigStatus | 4.0.0 | sync | Y | | APPC | chef | 3.0.0 | sync | Y | | APPC | CommonConfiguration | 4.0.0 | sync | Y | | APPC | Configure | 4.0.0 | sync | Y | | APPC | CreateSnapShotVM | 2.0.0 | sync | Y | | APPC | DGOrchestrator | 4.0.0 | sync | Y | | APPC | DownloadCliConfig | 4.0.0 | sync | Y | | APPC | DownloadIsbcConfig | 4.0.0 | sync | Y | | APPC | DownloadNetconfConfig | 3.0.0 | sync | N | | APPC | DownloadRestconfConfig | 4.0.0 | sync | Y | | APPC | DownloadSBGConfig | 4.0.0 | sync | Y | | APPC | DownloadvIRCChefConfig | 4.0.0 | sync | Y | | APPC | DownloadXmlConfig | 4.0.0 | sync | Y | | APPC | EvacuateVM | 2.0.0 | sync | Y | | APPC | FIREWALL_Configure | 2.0.0 | sync | N | | APPC | GenerateConfig | 4.0.0 | sync | Y | | APPC | GenerateTemplateConfig | 4.0.0 | sync | Y | | APPC | Generic_AnsibleDG | 4.0.0 | sync | Y | | APPC | Generic_Audit | 2.0.0 | sync | Y | | APPC | Generic_ChefDG | 4.0.0 | sync | N | | APPC | Generic_Configure | 4.0.0 | sync | N | | APPC | Generic_GetRunningConfig | 2.0.0 | sync | N | | APPC | Generic_Restart | 2.0.1 | sync | N | | APPC | Generic_Restart | 3.0.0 | sync | Y | | APPC | Generic_Stop | 2.0.0 | sync | N | | APPC | Generic_Sync | 2.0.0 | sync | Y | | APPC | Generic_Terminate | 2.0.0 | sync | N | | APPC | Generic_Terminate | 2.0.1 | sync | N | | APPC | GetAaiInfo | 4.0.0 | sync | Y | | APPC | GetAaiInfoTest | 4.0.0 | sync | N | | APPC | GetConfigParams | 4.0.0 | sync | Y | | APPC | GetDeviceRunningConfig | 4.0.0 | sync | Y | | APPC | GetRunningConfig | 2.0.0 | sync | Y | | APPC | GetTemplateConfig_Ansible | 4.0.0 | sync | Y | | APPC | GetTemplateConfig_Chef | 4.0.0 | sync | Y | | APPC | GetVfModuleInfo | 4.0.0 | sync | Y | | APPC | healthcheck | 4.0.0 | sync | Y | | APPC | HealthCheck_VNF_vSCP | 2.0.0 | sync | Y | | APPC | HUB_Configure | 2.0.0 | sync | N | | APPC | loadTeamplate | 4.0.0 | sync | Y | | APPC | MergeTemplateData | 4.0.0 | sync | Y | | APPC | MigrateVM | 2.0.0 | sync | Y | | APPC | ProcessParameterDefinition | 4.0.0 | sync | Y | | APPC | PublishConfiguration | 4.0.0 | sync | Y | | APPC | RebuildVM | 2.0.0 | sync | Y | | APPC | Rebuild_VM | 2.0.0 | sync | Y | | APPC | Rebuild_VNF | 2.0.0 | sync | N | | APPC | Rebuild_VNFC | 2.0.0 | sync | N | | APPC | Restart-Active-Active_VNFC | 2.0.0 | sync | Y | | APPC | Restart-Active-Passive_VNFC | 2.0.0 | sync | Y | | APPC | RestartVMCommonFlow | 2.0.0 | sync | Y | | APPC | RestartVMVNFCommonFlow | 2.0.0 | sync | Y | | APPC | RestartVM_VM | 2.0.0 | sync | Y | | APPC | Restart_VM | 2.0.0 | sync | Y | | APPC | Restart_VNF | 2.0.0 | sync | Y | | APPC | Restart_VNFC | 2.0.0 | sync | Y | | APPC | SaveRunningConfig | 4.0.0 | sync | Y | | APPC | setInputParams | 4.0.0 | sync | Y | | APPC | SetStatus | 4.0.0 | sync | Y | | APPC | StartApplication_VM_vSCP | 2.0.0 | sync | Y | | APPC | Start_VM | 2.0.0 | sync | Y | | APPC | Start_VNF | 2.0.0 | sync | Y | | APPC | Start_VNFC | 2.0.0 | sync | Y | | APPC | StopApplication_VM_vSCP | 2.0.0 | sync | Y | | APPC | StopVM_VM | 2.0.0 | sync | Y | | APPC | Stop_VM | 2.0.0 | sync | Y | | APPC | Stop_VNF | 2.0.1 | sync | N | | APPC | Stop_VNF | 2.0.2 | sync | Y | | APPC | Stop_VNFC | 2.0.2 | sync | Y | | APPC | SWITCH_Restart | 2.0.0 | sync | N | | APPC | topology-operation-all | 2.0.0 | sync | Y | | APPC | UpdateAaiforPayloadInput | 3.0.0 | sync | N | | APPC | UpdateAaiforReferenceData | 4.0.0 | sync | N | | APPC | UpdateAaiInfo | 4.0.0 | sync | Y | | APPC | VM_Start | 2.0.0 | sync | Y | | APPC | VM_Stop | 2.0.0 | sync | Y | | Appc-API | acquire_and_return | 2.0.0.0 | sync | N | | Appc-API | acquire_license | 2.0.0.0 | sync | N | | Appc-API | audit-configuration-notification | 4.0.0 | sync | Y | | Appc-API | audit-configuration-operation | 4.0.0 | sync | Y | | Appc-API | Generic_Evacuate | 2.0.0 | sync | Y | | Appc-API | legacy_operation | 2.0.0.0 | sync | N | | Appc-API | NETCONF_Configure | 2.0.0.0 | sync | N | | Appc-API | return_license | 2.0.0.0 | sync | N | | Appc-API | service-configuration-activate | 4.0.0 | sync | Y | | Appc-API | service-configuration-backup | 4.0.0 | sync | Y | | Appc-API | service-configuration-notification | 4.0.0 | sync | Y | | Appc-API | service-configuration-operation | 4.0.0 | sync | Y | | Appc-API | service-configuration-prepare | 4.0.0 | sync | Y | | Appc-API | test_acquire_license | 2.0.0.0 | sync | N | | Appc-API | test_return_license | 2.0.0.0 | sync | N | | Appc-API | update-aai | 4.0.0 | sync | Y | | Appc-API | update-aai-sbg | 4.0.0 | sync | Y | | Appc-API | update-vnfc-info | 4.0.0 | sync | Y | | Appc-API | update-vserver-info | 4.0.0 | sync | Y | | Appc-API | VNF_Backup | 2.0.0.0 | sync | N | | APPC-API | VNF_Configure | 2.0.0 | sync | N | | Appc-API | VNF_HealthCheck | 2.0.0.0 | sync | N | | APPC-API | VNF_Rollback | 2.0.0.0 | sync | N | | APPC-API | VNF_Snapshot | 2.0.0.0 | sync | N | | Appc-API | VNF_UpgradePreconditionCheck | 2.0.0.0 | sync | N | | Appc-API | VNF_UploadNewVersion | 2.0.0.0 | sync | N | | ASDC-API | vf-license-model-update | 0.1.0-SNAPSHOT | sync | Y | | sli | healthcheck | 0.1.0-SNAPSHOT | sync | Y | +----------+------------------------------------+----------------+------+--------+

PROTOCOL_REFERENCE

The Protocol Reference table contains the protocol required to support the ACTION, VNF_TYPE and ACTION_LEVEL

  • As of 11/7/2017 the VNF_TYPE is required even for a vm level action due to an existing defect.

PROTOCOL_REFERENCE List
select * from PROTOCOL_REFERENCE; Sample Results: +-----------------------+------------------+--------------------------------------+-------------+---------------------+----------+--------------+ | PROTOCOL_REFERENCE_ID | ACTION | VNF_TYPE | PROTOCOL | UPDATED_DATE | TEMPLATE | ACTION_LEVEL | +-----------------------+------------------+--------------------------------------+-------------+---------------------+----------+--------------+ | 1| Snapshot | | OS | 2017-09-13 17:04:46 | null | vm | | 2 | Evacuate | | OS | 2017-09-14 14:27:52 | null | vm | | 3 | Migrate | | OS | 2017-09-14 14:27:52 | null | vm | | 4 | Rebuild | | OS | 2017-09-14 14:27:52 | null | vm | | 5 | Restart | | OS | 2017-09-14 14:27:52 | null | vm | | 6 | Rollback | | OS | 2017-09-14 14:27:52 | null | vm | | 7 | Start | | OS | 2017-09-14 14:27:52 | null | vm | | 8 | Stop | | OS | 2017-09-14 14:27:52 | null | vm | | 7 | Restart | NULL | OS | 2017-10-25 14:56:45 | NULL | vnf | | 9 | Restart | vFW | OS | 2017-10-30 19:18:19 | N | vnf | | 10 | Stop | vFW | OS | 2017-10-31 18:30:21 | N | vm | | 11 | Start | vFW | OS | 2017-10-31 18:30:47 | N | vm | | 12 | Restart | vCPE | OS | 2017-11-01 18:35:49 | N | vnf | | 13 | Stop | vCPE | OS | 2017-11-01 18:37:30 | N | vm | | 14 | Start | vCPE | OS | 2017-11-01 18:37:39 | N | vm | | 15 | Rebuild | vTESTVM | OS | 2017-11-02 17:09:44 | N | vm | +-----------------------+------------------+--------------------------------------+-------------+---------------------+----------+--------------+

PROCESS_FLOW_REFERENCE

The Process Flow Reference table maps the process flow which represents of APPC will process the requested action



PROCESS_FLOW_REFERENCE List
select * from PROCESS_FLOW_REFERENCE; Sample Results: +---------------------------+------------------+--------------+-------------+----------------+------------------+------------------------+---------------------+--------------------+ | PROCESS_FLOW_REFERENCE_ID | ACTION | ACTION_LEVEL | PROTOCOL | EXECUTION_TYPE | EXECUTION_MODULE | EXECUTION_RPC | UPDATED_DATE | GET_RUNNING_CONFIG | +---------------------------+------------------+--------------+-------------+----------------+------------------+------------------------+---------------------+--------------------+ | 1 | rebuild | vm | OS | graph | APPC | RebuildVM | 2017-08-25 19:40:05 | NULL | | 2 | migrate | vm | OS | graph | APPC | MigrateVM | 2017-08-25 19:40:05 | NULL | | 3 | restart | vm | OS | graph | APPC | RestartVMVNFCommonFlow | 2017-08-25 19:40:05 | NULL | | 4 | evacuate | vm | OS | graph | APPC | EvacuateVM | 2017-09-12 16:49:54 | NULL | | 5 | rebuild | vm | OS | graph | APPC | RebuildVM | 2017-09-12 16:49:54 | NULL | | 6 | migrate | vm | OS | graph | APPC | MigrateVM | 2017-09-12 16:49:54 | NULL | | 7 | restart | vm | OS | graph | APPC | RestartVMVNFCommonFlow | 2017-09-12 16:49:54 | NULL | | 8 | Start | vm | OS | graph | APPC | VM_Start | 2017-09-12 16:49:54 | NULL | | 9 | Stop | vm | OS | graph | APPC | VM_Stop | 2017-09-12 16:49:54 | NULL | | 10 | Restart | vm | OS | graph | APPC | RestartVMVNFCommonFlow | 2017-10-17 15:50:00 | NULL | | 11 | Rebuild | vm | OS | graph | APPC | RebuildVM | 2017-10-17 15:51:03 | NULL | | 12 | Restart | vnf | OS | graph | APPC | RestartVMVNFCommonFlow | 2017-10-24 16:48:06 | NULL | +---------------------------+------------------+--------------+-------------+----------------+------------------+------------------------+---------------------+--------------------+

VNF_STATE_MANAGEMENT

The VNF State Management table contains any active VNF states APPC is currently managing



VNF_STATE_MANAGEMENT List
select * from VNF_STATE_MANAGEMENT; Sample Results: +------------------------------------+----------+-----------------------------------------------------------+---------------+-----+ | VNF_ID | STATE | OWNER_ID | UPDATED | VER | +------------------------------------+----------+-----------------------------------------------------------+---------------+-----+ | APPC_Test_VM | UNSTABLE | VNF-Restart-APPC_Test_VM@VNF-DMaaP-Restart-APPC_Test_VM@2 | 1509747445000 | 1 | +------------------------------------+----------+-----------------------------------------------------------+---------------+-----+

VNF_LOCK_MANAGEMENT

The VNF Lock Management table contains current VNF locks preventing APPC to execute an action if the VNF is locked

  • One example of this is that a Restart of the VNF is currently in process.  The lock prevents any further actions from occurring while the VNF is being restarted.

VNF_LOCK_MANAGEMENT List
select * from VNF_LOCK_MANAGEMENT; Empty set (0.00 sec)

Related content