diff options
author | 2018-09-19 17:40:40 -0400 | |
---|---|---|
committer | 2018-09-19 17:40:40 -0400 | |
commit | fbe4bb98345727d190cefcfb3ec54ad9075fba9d (patch) | |
tree | f2e0c091a4c132c89dafb061c81eeebfb0e9a773 /cmso-robot/robot/assets | |
parent | b031d50f82f8ca5b7fd0609a92c719f43a9f518d (diff) |
Change Management Schedule Optimization
Adding Robot Test Scripts for Change Management Schedule Optimization
Change-Id: Id5edf9d3fb3c2390791362692c8b25f7607045c6
Issue-ID: OPTFRA-352
Signed-off-by: RamaPrasad Amaranarayana (ra5425) <ra5425@att.com>
Diffstat (limited to 'cmso-robot/robot/assets')
41 files changed, 948 insertions, 0 deletions
diff --git a/cmso-robot/robot/assets/get_schedule_UUIDs.txt b/cmso-robot/robot/assets/get_schedule_UUIDs.txt new file mode 100644 index 0000000..e49014d --- /dev/null +++ b/cmso-robot/robot/assets/get_schedule_UUIDs.txt @@ -0,0 +1,7 @@ +dummy 200 +dummy 200 +dummy 200 +dummy 200 +dummy 200 +dummy 200 +not-a-scheduleID 404
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/InitDB.sql b/cmso-robot/robot/assets/sql/InitDB.sql new file mode 100644 index 0000000..72667cb --- /dev/null +++ b/cmso-robot/robot/assets/sql/InitDB.sql @@ -0,0 +1,3 @@ +INSERT INTO `scheduler`.`domains` (`domain`) VALUES ('ChangeManagement'); +INSERT INTO `scheduler`.`approval_types` (`domain`, `approval_type`, `approval_count`) VALUES ('ChangeManagement', 'Tier 2', '1'); +SET @@global.time_zone='+00:00';
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/OptimizationInProgresss.sql b/cmso-robot/robot/assets/sql/OptimizationInProgresss.sql new file mode 100644 index 0000000..3123ad7 --- /dev/null +++ b/cmso-robot/robot/assets/sql/OptimizationInProgresss.sql @@ -0,0 +1,3 @@ +SET SQL_SAFE_UPDATES = 0; +update schedules set status = 'Pending Schedule' where status = 'Optimization in Progress'; +SET SQL_SAFE_UPDATES = 1;
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/VericaQueries.sql b/cmso-robot/robot/assets/sql/VericaQueries.sql new file mode 100644 index 0000000..9d59f43 --- /dev/null +++ b/cmso-robot/robot/assets/sql/VericaQueries.sql @@ -0,0 +1,9 @@ + SELECT distinct vnf_name, pserver_fqdn, pserver_hostname + from qa0_dcaecommon_views.v_vnf_vm_pserver; + +SELECT distinct vnf_name, pserver_fqdn, pserver_hostname from qa0_dcaecommon_views.v_vce_vm_pserver where vnf_name in ('ZRDM1MMSC04') +UNION +SELECT distinct vnf_name, pserver_fqdn, pserver_hostname from qa0_dcaecommon_views.v_vnf_vm_pserver where vnf_name in ('ZRDM1MMSC04') +UNION +SELECT distinct vnf_name, pserver_fqdn, pserver_hostname from qa0_dcaecommon_views.v_vpe_vm_pserver where vnf_name in ('ZRDM1MMSC04') +;
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/clearthetable.sql b/cmso-robot/robot/assets/sql/clearthetable.sql new file mode 100644 index 0000000..e382222 --- /dev/null +++ b/cmso-robot/robot/assets/sql/clearthetable.sql @@ -0,0 +1,11 @@ +SET SQL_SAFE_UPDATES = 0; +delete from DOMAIN_DATA; +delete from CHANGE_MANAGEMENT_CHANGE_WINDOWS; +delete from CHANGE_MANAGEMENT_RELATED_ASSETS; +delete from CHANGE_MANAGEMENT_SCHEDULES; +delete from CHANGE_MANAGEMENT_GROUPS; +delete from SCHEDULE_APPROVALS; +delete from SCHEDULE_EVENTS; +delete from SCHEDULES; + +SET SQL_SAFE_UPDATES = 1; diff --git a/cmso-robot/robot/assets/sql/demo.sql b/cmso-robot/robot/assets/sql/demo.sql new file mode 100644 index 0000000..c099283 --- /dev/null +++ b/cmso-robot/robot/assets/sql/demo.sql @@ -0,0 +1,11 @@ + SELECT DISTINCT + s.schedule_id, s.status, s.schedule_info, s.schedule, g.start_time, + d.vnf_name, d.status vnf_status, d.status_message, d.aots_change_id, d.aots_approval_status, d.mso_request_id, d.mso_status, d.aots_status, s.user_id, FROM_UNIXTIME(d.start_time/1000) as StartTime, FROM_UNIXTIME(s.create_date_time/1000) as CreateDateTime +FROM + SCHEDULES s, + CHANGE_MANAGEMENT_GROUPS g, + CHANGE_MANAGEMENT_SCHEDULES d +WHERE + g.schedules_id = s.id + AND d.change_management_groups_id = g.id + order by CreateDateTime desc;
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/searchSQL.sql b/cmso-robot/robot/assets/sql/searchSQL.sql new file mode 100644 index 0000000..952800c --- /dev/null +++ b/cmso-robot/robot/assets/sql/searchSQL.sql @@ -0,0 +1,20 @@ +select distinct +s.vnf_name as vnFName, +s.vnf_id as vnfId, +s.status as status, +s.aots_change_id as aotsChangeId, +s.start_time as startTime, +s.finish_time as finishTime, +g.group_id as groupId, +g.last_instance_start_time as lastInstanceStartTime, +g.policy_id as policyId, +g.schedules_id as id, +ss.schedule_id as scheduleId, +dd.name +from change_management_schedules s +inner join change_management_groups g on s.change_management_groups_id = g.id +inner join schedules ss on g.schedules_id = ss.id +left outer join domain_data dd on ss.id = dd.schedules_id +left outer join schedule_approvals sa on ss.id = sa.schedules_id +inner join approval_types at on sa.approval_type_id = at.id +left outer join change_management_related_assets cmra on cmra.change_management_schedule_id = s.id diff --git a/cmso-robot/robot/assets/sql/selectDetails.sql b/cmso-robot/robot/assets/sql/selectDetails.sql new file mode 100644 index 0000000..74fa390 --- /dev/null +++ b/cmso-robot/robot/assets/sql/selectDetails.sql @@ -0,0 +1,4 @@ +SET @@global.time_zone='+00:00'; +select distinct ss.create_date_time, s.id as id, s.vnf_name as vnf_name, s.vnf_id as vnf_id, s.status as status, s.aots_change_id as aots_change_Id, s.start_time as start_time, s.finish_time as finish_time, g.group_id as group_id, g.last_instance_start_time as last_instance_start_time, g.policy_id as policy_id, g.schedules_id as schedules_id from change_management_schedules s inner join change_management_groups g on s.change_management_groups_id = g.id inner join schedules ss on g.schedules_id = ss.id left outer join domain_data dd on ss.id = dd.schedules_id left outer join schedule_approvals sa on ss.id = sa.schedules_id inner join approval_types at on sa.approval_type_id = at.id left outer join change_management_related_assets cmra on cmra.change_management_schedule_id = s.id +-- where ((ss.create_date_time >= TIMESTAMP('2017-07-14T21:30:02.000-0000') AND ss.create_date_time <= TIMESTAMP('2017-07-14T21:30:03.000-0000') )) +order by id
\ No newline at end of file diff --git a/cmso-robot/robot/assets/sql/selectall.sql b/cmso-robot/robot/assets/sql/selectall.sql new file mode 100644 index 0000000..ba41595 --- /dev/null +++ b/cmso-robot/robot/assets/sql/selectall.sql @@ -0,0 +1,9 @@ +select * from DOMAINS; +select * from DOMAIN_DATA order by schedules_id desc; +select * from CHANGE_MANAGEMENT_SCHEDULES order by id desc; +select * from CHANGE_MANAGEMENT_CHANGE_WINDOWS; +select * from CHANGE_MANAGEMENT_GROUPS; +select * from SCHEDULES order by id desc; +select * from APPROVAL_TYPES; +select * from SCHEDULE_APPROVALS; +select * from SCHEDULE_EVENTS;
\ No newline at end of file diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template new file mode 100644 index 0000000..d806855 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template new file mode 100644 index 0000000..a8315f6 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template new file mode 100644 index 0000000..29a0a6a --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template new file mode 100644 index 0000000..e239d7d --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template new file mode 100644 index 0000000..c5bab19 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "string", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template new file mode 100644 index 0000000..b7eedc5 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Not A Workflow" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template new file mode 100644 index 0000000..8cd0703 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : -5, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template new file mode 100644 index 0000000..2973c89 --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template new file mode 100644 index 0000000..9c5670c --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template new file mode 100644 index 0000000..e97c46e --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template new file mode 100644 index 0000000..1c2c3ce --- /dev/null +++ b/cmso-robot/robot/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-id", + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "dummy{node}" + ], + "changeWindow" : [{ + "startTime" : "${end_time1}", + "endTime" : "${start_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template new file mode 100644 index 0000000..5c9e0a3 --- /dev/null +++ b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "VNFName1${testid}", + "VNFName2${testid}", + "VNFName3${testid}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template new file mode 100644 index 0000000..19c1d87 --- /dev/null +++ b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "VNFName1${testid}", + "VNFName2${testid}", + "VNFName3${testid}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template new file mode 100644 index 0000000..ab92d18 --- /dev/null +++ b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "VNFName1${testid}", + "VNFName2${testid}", + "VNFName3${testid}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template new file mode 100644 index 0000000..9de749c --- /dev/null +++ b/cmso-robot/robot/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "groupId" : "", + "node" : [ + "VNFName1${testid}", + "VNFName2${testid}", + "VNFName3${testid}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template new file mode 100644 index 0000000..86ae4b8 --- /dev/null +++ b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template @@ -0,0 +1,20 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "node" : [ + "dummy{node}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template new file mode 100644 index 0000000..ba555ac --- /dev/null +++ b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template @@ -0,0 +1,20 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "node" : [ + "dummy{node}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template new file mode 100644 index 0000000..b5cf73e --- /dev/null +++ b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + + "vnfDetails" : [{ + "node" : [ + "dummy{node}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template new file mode 100644 index 0000000..461f166 --- /dev/null +++ b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template @@ -0,0 +1,14 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + } +} diff --git a/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template new file mode 100644 index 0000000..a2a4ba4 --- /dev/null +++ b/cmso-robot/robot/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template @@ -0,0 +1,14 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/MultipleVnfImmediate.json.template b/cmso-robot/robot/assets/templates/changemanagement/MultipleVnfImmediate.json.template new file mode 100644 index 0000000..542e19e --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/MultipleVnfImmediate.json.template @@ -0,0 +1,24 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "${workflow}" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}", + "${node2}", + "${node3}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template new file mode 100644 index 0000000..4630faa --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template @@ -0,0 +1,32 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "${workflow}" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}", + "${node2}", + "${node3}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template new file mode 100644 index 0000000..061b4f6 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template @@ -0,0 +1,37 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "${workflow}" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "Group1", + "node" : [ + "${node1}", + "${node2}", + "${node3}", + "${node4}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + },{ + "startTime" : "${start_time2}", + "endTime" : "${end_time2}" + } + ] + } + ] + } +} + diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediate.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediate.json.template new file mode 100644 index 0000000..c108c15 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediate.json.template @@ -0,0 +1,25 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "${workflow}", + "plans" : "Run ${workflow}", + "question.000000000000001" : "Yes" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "vnfDetails" : [{ + "groupId" : "group1", + "node" : [ + "${node1}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template new file mode 100644 index 0000000..e91c653 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template @@ -0,0 +1,21 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Not A Workflow" + } + ], + "schedulingInfo" : { + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template new file mode 100644 index 0000000..d896a62 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template @@ -0,0 +1,23 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "ReplaceVnfInfra" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template new file mode 100644 index 0000000..a3ada80 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "${workflow}" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template new file mode 100644 index 0000000..f1fe686 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template @@ -0,0 +1,25 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "", + "WorkflowName" : "Build Software Upgrade for vNFs" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template new file mode 100644 index 0000000..e5c691e --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Build Software Upgrade for vNFs" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template new file mode 100644 index 0000000..11a50cb --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template @@ -0,0 +1,30 @@ +{ + "domain" : "ChangeManagement", + "scheduleId" : "${uuid}", + "scheduleName" : "${uuid}", + "userId" : "${userId}", + "domainData" : [{ + "CallbackUrl" : "${callbackUrl}", + "CallbackData" : "${callbackData}", + "WorkflowName" : "Replace" + } + ], + "schedulingInfo" : { + "normalDurationInSeconds" : 100, + "additionalDurationInSeconds" : 10, + "concurrencyLimit" : 10, + "policyId" : "dummy-policy-id", + "vnfDetails" : [{ + "groupId" : "group", + "node" : [ + "${node1}" + ], + "changeWindow" : [{ + "startTime" : "${start_time1}", + "endTime" : "${end_time1}" + } + ] + } + ] + } +} diff --git a/cmso-robot/robot/assets/templates/changemanagement/VidCallbackData.json.template b/cmso-robot/robot/assets/templates/changemanagement/VidCallbackData.json.template new file mode 100644 index 0000000..ed3be93 --- /dev/null +++ b/cmso-robot/robot/assets/templates/changemanagement/VidCallbackData.json.template @@ -0,0 +1,40 @@ +{ + "requestType" : "Update", + "requestDetails" : [{ + "vnfName" : "dummy-vnf", + "vnfInstanceId" : "dummy-vnfinstance-id", + "modelInfo" : { + "modelType" : "vnf", + "modelInvariantId" : "dummy-id", + "modelVersionId" : "dummy-id", + "modelName" : "dummy", + "modelCustomizationId" : "dummy-id" + }, + "cloudConfiguration" : { + "lcpCloudRegionId" : "dummy", + "tenantId" : "dummy-id" + }, + "requestInfo" : { + "source" : "VID", + "suppressRollback" : false, + "requestorId" : "az2016" + }, + "relatedInstanceList" : [{ + "relatedInstance" : { + "instanceId" : "dummy-id", + "modelInfo" : { + "modelType" : "service", + "modelInvariantId" : "dummy-id", + "modelVersionId" : "dummy-id", + "modelName" : "dummy-id", + "modelVersion" : "4.0" + } + } + } + ], + "requestParameters" : { + "usePreload" : true + } + } + ] +} diff --git a/cmso-robot/robot/assets/test_properties.py b/cmso-robot/robot/assets/test_properties.py new file mode 100644 index 0000000..cab823d --- /dev/null +++ b/cmso-robot/robot/assets/test_properties.py @@ -0,0 +1,41 @@ +from os import listdir +from os.path import isfile, join + +# Should be provided in Jenkins job + +GLOBAL_SCHEDULER_HOST = "dummy-host" +GLOBAL_SCHEDULER_PORT = dummy-port +GLOBAL_SCHEDULER_PROTOCOL = "https" +GLOBAL_VID_USERID = "onap-user" +GLOBAL_SCHEDULER_PASSWORD = "pwd" + +GLOBAL_SCHEDULER_USER = "dummy-user" +GLOBAL_APPLICATION_ID= "schedulertest" +GLOBAL_VTM_URL="http://localhost:25055" +GLOBAL_LISTCHANGE_PATH="/service=searchchangerecord.vtm.att.com/vtm/searchChangeRecord/v1/listChangeRecords/version=1.0.0/envContext=TEST/routeOffer=DEFAULT" + + +GLOBAL_VTM_PROTO="http" +GLOBAL_VTM_HOST="dummy-host" +GLOBAL_VTM_CLOSE_PORT=31127 + +GLOBAL_VTM_USER="dummy-user" +GLOBAL_VTM_PASSWORD="dummy-pwd" +GLOBAL_VID_CALLBACK_URL="http://localhost:8900/scheduler/v1/loopbacktest/vid" +cmFailurePath= "robot/assets/templates/FailureCasesChangeManagement" +GLOBAL_CM_FAILURE_TEMPLATES= [f for f in listdir(cmFailurePath) if isfile(join(cmFailurePath, f))] + +OneVNFImmediateFailurePath="robot/assets/templates/OneVNFImmediateFailureCases" +GLOBAL_CM_ONEVNF_FAILURE_TEMPLATES=[f for f in listdir(OneVNFImmediateFailurePath) if isfile(join(OneVNFImmediateFailurePath, f))] + +MultipleVNFImmediateFailurePath="robot/assets/templates/MutipleVNFImmediateFailureCases" +GLOBAL_CM_MULTIPLE_VNF_FAILURE_TEMPLATES=[f for f in listdir(MultipleVNFImmediateFailurePath) if isfile(join(MultipleVNFImmediateFailurePath, f))] + + +DELETE_TICKET_ENVS = [ + {"scheduler" : "dummy", "vtm" : "dummy"}, + {"scheduler" : "dummy", "vtm" : "dummy"}, +] + +NODES = "dummy,dummy,dummy,dummy"; +
\ No newline at end of file |