From 6df50b96c77bd6402ea4bd7f1a84de6233549cdf Mon Sep 17 00:00:00 2001 From: Jerry Flood Date: Thu, 30 May 2019 10:36:24 -0400 Subject: Initial docs update for Dublin Issue-ID: OPTFRA-510 Change-Id: Ic2027fbd66de0f45f826282701c9979fc1599cb0 Signed-off-by: Jerry Flood --- docs/sections/swaggerdoc/oof-cmso-api.json | 1161 ------------------ .../swaggerdoc/oof-cmso-optimizer-api.json | 538 +++++++++ docs/sections/swaggerdoc/oof-cmso-service-api.json | 1234 ++++++++++++++++++++ .../swaggerdoc/oof-cmso-ticketmgt-api.json | 670 +++++++++++ docs/sections/swaggerdoc/oof-cmso-topology.json | 516 ++++++++ 5 files changed, 2958 insertions(+), 1161 deletions(-) delete mode 100644 docs/sections/swaggerdoc/oof-cmso-api.json create mode 100644 docs/sections/swaggerdoc/oof-cmso-optimizer-api.json create mode 100644 docs/sections/swaggerdoc/oof-cmso-service-api.json create mode 100644 docs/sections/swaggerdoc/oof-cmso-ticketmgt-api.json create mode 100644 docs/sections/swaggerdoc/oof-cmso-topology.json (limited to 'docs/sections/swaggerdoc') diff --git a/docs/sections/swaggerdoc/oof-cmso-api.json b/docs/sections/swaggerdoc/oof-cmso-api.json deleted file mode 100644 index 751b276..0000000 --- a/docs/sections/swaggerdoc/oof-cmso-api.json +++ /dev/null @@ -1,1161 +0,0 @@ -{ - "swagger" : "2.0", - "info" : { - "version" : "1.0.0-SNAPSHOT", - "title" : "cmso-service" - }, - "basePath" : "/cmso", - "paths" : { - "/{apiVersion}/admin/{id}" : { - "get" : { - "summary" : "", - "description" : "Returns encrypted value of id.", - "operationId" : "exec", - "produces" : [ "text/plain" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1|v2", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "id", - "in" : "path", - "description" : "Identifier", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "OK", - "schema" : { - "type" : "string" - } - }, - "400" : { - "description" : "Request failed" - } - } - } - }, - "/{apiVersion}/health" : { - "get" : { - "summary" : "", - "description" : "Returns health status of server.", - "operationId" : "healthCheck", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "checkInterfaces", - "in" : "query", - "description" : "Check Interfaces", - "required" : false, - "type" : "array", - "items" : { - "type" : "boolean", - "default" : true - }, - "collectionFormat" : "multi" - } ], - "responses" : { - "200" : { - "description" : "OK", - "schema" : { - "$ref" : "#/definitions/HealthCheckMessage" - } - }, - "400" : { - "description" : "Not healthy", - "schema" : { - "$ref" : "#/definitions/HealthCheckMessage" - } - } - } - } - }, - "/{apiVersion}/optimizerCallback" : { - "post" : { - "summary" : "", - "description" : "Processes optimizer results callback to a Pending Optimization schedule.", - "operationId" : "sniroCallback", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "in" : "body", - "name" : "body", - "description" : "Return schedules > lastScheduleId", - "required" : false, - "schema" : { - "$ref" : "#/definitions/Response from schedule optimizer" - } - } ], - "responses" : { - "200" : { - "description" : "OK" - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - } - }, - "/{apiVersion}/schedules" : { - "get" : { - "summary" : "", - "description" : "Returns a list of Scheduler Requests based upon the filter criteria.", - "operationId" : "searchScheduleRequests", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "includeDetails", - "in" : "query", - "description" : "Include details", - "required" : false, - "type" : "boolean", - "default" : false - }, { - "name" : "scheduleId", - "in" : "query", - "description" : "Schedule identifier", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "scheduleName", - "in" : "query", - "description" : "Schedule name", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "userId", - "in" : "query", - "description" : "SCheduler creator User id of ", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "status", - "in" : "query", - "description" : "Schedule status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "createDateTime", - "in" : "query", - "description" : "Creation date and time ([,])", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "optimizerStatus", - "in" : "query", - "description" : "Optimizer status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "WorkflowName", - "in" : "query", - "description" : "Workflow", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - } ], - "responses" : { - "200" : { - "description" : "OK", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Schedule" - } - } - }, - "404" : { - "description" : "No records found", - "schema" : { - "$ref" : "#/definitions/CMSRequestError" - } - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - } - }, - "/{apiVersion}/schedules/scheduleDetails" : { - "get" : { - "summary" : "", - "description" : "Returns a list of Schedule request details based upon the filter criteria.", - "operationId" : "searchScheduleRequestDetails", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "request.scheduleId", - "in" : "query", - "description" : "Schedule identifier", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.scheduleName", - "in" : "query", - "description" : "Schedule name", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.userId", - "in" : "query", - "description" : "Scheduler creator User id of ", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.status", - "in" : "query", - "description" : "Schedule status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.createDateTime", - "in" : "query", - "description" : "Creation date and time ([,])", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.optimizerStatus", - "in" : "query", - "description" : "Optimizer status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.approvalUserId", - "in" : "query", - "description" : "Request Approval user id", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.approvalStatus", - "in" : "query", - "description" : "Request Approval status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "request.approvalType", - "in" : "query", - "description" : "Request Approval type", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "WorkflowName", - "in" : "query", - "description" : "Workflow", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "vnfName", - "in" : "query", - "description" : "VNF Name", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "vnfId", - "in" : "query", - "description" : "VNF Id", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "vnfStatus", - "in" : "query", - "description" : "VNF Status", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "startTime", - "in" : "query", - "description" : "Start time ,", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "finishTime", - "in" : "query", - "description" : "Finish time ,", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "lastInstanceTime", - "in" : "query", - "description" : "Last instance start time ,", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "tmChangeId", - "in" : "query", - "description" : "TM Change Ticket Change Id", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi" - }, { - "name" : "maxSchedules", - "in" : "query", - "description" : "Maximum number of schedules to return", - "required" : false, - "type" : "integer", - "format" : "int32" - }, { - "name" : "lastScheduleId", - "in" : "query", - "description" : "Return schedules > lastScheduleId", - "required" : false, - "type" : "string" - }, { - "name" : "request.concurrencyLimit", - "in" : "query", - "description" : "Return concurrencyLimit", - "required" : false, - "type" : "integer", - "format" : "int32" - } ], - "responses" : { - "200" : { - "description" : "OK", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/CmDetailsMessage" - } - } - }, - "404" : { - "description" : "No records found", - "schema" : { - "$ref" : "#/definitions/CMSRequestError" - } - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - } - }, - "/{apiVersion}/schedules/{scheduleId}" : { - "get" : { - "summary" : "", - "description" : "Retrieve the schedule request for scheduleId", - "operationId" : "getScheduleRequestInfo", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "scheduleId", - "in" : "path", - "description" : "Schedule id to uniquely identify the schedule info being retrieved.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "OK", - "schema" : { - "$ref" : "#/definitions/Schedule" - } - }, - "404" : { - "description" : "No record found" - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - }, - "post" : { - "summary" : "", - "description" : "Creates a schedule request for scheduleId", - "operationId" : "createScheduleRequest", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "scheduleId", - "in" : "path", - "description" : "Schedule id to uniquely identify the schedule request being created.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Data for creating a schedule request for the given schedule id", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CMSMessage" - } - } ], - "responses" : { - "202" : { - "description" : "Schedule request accepted for optimization." - }, - "409" : { - "description" : "Schedule request already exists for this schedule id.", - "schema" : { - "$ref" : "#/definitions/CMSRequestError" - } - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - }, - "delete" : { - "summary" : "", - "description" : "Cancels the schedule request for scheduleId", - "operationId" : "deleteScheduleRequest", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "scheduleId", - "in" : "path", - "description" : "Schedule id to uniquely identify the schedule request being deleted.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "204" : { - "description" : "Delete successful" - }, - "404" : { - "description" : "No record found", - "schema" : { - "$ref" : "#/definitions/CMSRequestError" - } - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - } - }, - "/{apiVersion}/schedules/{scheduleId}/approvals" : { - "post" : { - "summary" : "", - "description" : "Adds an accept/reject approval status to the schedule request identified by scheduleId", - "operationId" : "approveScheduleRequest", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "apiVersion", - "in" : "path", - "description" : "v1", - "required" : true, - "type" : "string", - "default" : "v1" - }, { - "name" : "scheduleId", - "in" : "path", - "description" : "Schedule id to uniquely identify the schedule request being accepted or rejected.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Accept or reject approval message", - "required" : false, - "schema" : { - "$ref" : "#/definitions/Schedule Approval Request" - } - } ], - "responses" : { - "200" : { - "description" : "OK" - }, - "404" : { - "description" : "No record found" - }, - "500" : { - "description" : "Unexpected Runtime error" - } - } - } - } - }, - "definitions" : { - "CMSMessage" : { - "type" : "object", - "properties" : { - "domain" : { - "type" : "string", - "description" : "Schedule domain : ChangeManagement" - }, - "scheduleId" : { - "type" : "string", - "description" : "Schedule id that must be unique within the domain. Use of UUID is highly recommended." - }, - "scheduleName" : { - "type" : "string", - "description" : "User provided name of the schedule (deaults to scheduleId" - }, - "userId" : { - "type" : "string", - "description" : "ATTUID of the user requesting the schedule." - }, - "domainData" : { - "type" : "array", - "description" : "Domain data as name value/pairs. (i.e. CallbackUrl, CallbackData, WorkflowName)", - "items" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - }, - "schedulingInfo" : { - "$ref" : "#/definitions/Change Management Scheduling Info" - } - } - }, - "CMSRequestError" : { - "type" : "object", - "properties" : { - "requestError" : { - "$ref" : "#/definitions/RequestError" - } - } - }, - "CMSchedule" : { - "type" : "object", - "properties" : { - "groupId" : { - "type" : "string" - }, - "startTime" : { - "type" : "string" - }, - "finishTime" : { - "type" : "string" - }, - "latestInstanceStartTime" : { - "type" : "string" - }, - "node" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "Change Management Group" : { - "type" : "object", - "properties" : { - "finishTime" : { - "type" : "string", - "description" : "Date/time by which all of the workflows should be completed." - }, - "groupId" : { - "type" : "string", - "description" : "Name of the group of VNFs to be scheduled" - }, - "lastInstanceStartTime" : { - "type" : "string", - "description" : "The latest date/time by which a workflow is to be started." - }, - "startTime" : { - "type" : "string", - "description" : "The date/time when workflows are to be started." - }, - "additionalDurationInSecs" : { - "type" : "integer", - "format" : "int32", - "description" : "Time added to the workflow interval to allow for rollback in case of failure." - }, - "concurrencyLimit" : { - "type" : "integer", - "format" : "int32", - "description" : "The maximum number of workflows that should be started simultaneiously." - }, - "normalDurationInSecs" : { - "type" : "integer", - "format" : "int32", - "description" : "Expected duration of a successful workflow execution." - }, - "policyId" : { - "type" : "string", - "description" : "The name of the schedule optimization policy used by the change management schedule optimizer." - }, - "changeManagementSchedules" : { - "type" : "array", - "description" : "The list of VNF workflows scheduled.", - "items" : { - "$ref" : "#/definitions/Change Management Schedule" - } - } - }, - "description" : "Scheduling critirea for a group of VNFs" - }, - "Change Management Schedule" : { - "type" : "object", - "properties" : { - "tmChangeId" : { - "type" : "string", - "description" : "TM Change Id" - }, - "tmStatus" : { - "type" : "string", - "description" : "TM ticket status", - "enum" : [ "", "Closed" ] - }, - "tmApprovalStatus" : { - "type" : "string", - "description" : "TM ticket approval status", - "enum" : [ "", "Approved" ] - }, - "finishTime" : { - "type" : "string", - "description" : "Anticipated time of completion based upon start time and duration" - }, - "startTime" : { - "type" : "string", - "description" : "Start time of this VNF workflow assigned by Scheduler based upon the group start time returned by the optimizer and concurrency." - }, - "status" : { - "type" : "string", - "description" : "Status of the VNF.", - "enum" : [ "See CMSStatusEnum" ] - }, - "vnfName" : { - "type" : "string", - "description" : "Name of the VNF." - }, - "dispatchTime" : { - "type" : "string", - "description" : "Actual time the VNF workflow was dispatched." - }, - "executionCompletedTime" : { - "type" : "string", - "description" : "Actual time the VNF workflow execution was completed as reported by MSO." - }, - "msoRequestId" : { - "type" : "string", - "description" : "MSO Request ID of the workflow returned at dispatch time." - }, - "msoStatus" : { - "type" : "string", - "description" : "Final MSO status.", - "enum" : [ "COMPLETED", "FAILED" ] - }, - "msoMessage" : { - "type" : "string", - "description" : "MSO final status message." - }, - "statusMessage" : { - "type" : "string", - "description" : "Scheduler status message." - }, - "msoTime" : { - "type" : "string", - "description" : "Time of last poll for MSO status." - } - }, - "description" : "VNF details for Change Management Schedule" - }, - "Change Management Scheduling Info" : { - "type" : "object", - "properties" : { - "normalDurationInSeconds" : { - "type" : "integer", - "format" : "int32", - "description" : "Expected duration (in seconds) of a successful execution of a single VNF change." - }, - "additionalDurationInSeconds" : { - "type" : "integer", - "format" : "int32", - "description" : "Additional duration (in seconds) to be added to support backout of an unsuccessful VNF change." - }, - "concurrencyLimit" : { - "type" : "integer", - "format" : "int32", - "description" : "Maximum number of VNF changes to schedule concurrently" - }, - "policyId" : { - "type" : "string", - "description" : "Name of schedule optimization policy used by the change management cmso optimizer to determine available time slot" - }, - "vnfDetails" : { - "type" : "array", - "description" : "Lists of the VNFs to be changed and the desired change windows", - "items" : { - "$ref" : "#/definitions/VNF Details" - } - } - }, - "description" : "Details of schedule being requested" - }, - "Change Window" : { - "type" : "object", - "properties" : { - "startTime" : { - "type" : "string", - "description" : "Earliest time that a set of changes may begin." - }, - "endTime" : { - "type" : "string", - "description" : "Latest time by which all changes must be completed" - } - }, - "description" : "Time window within which the scheduler optimizer can schedule the changes for the group of NVFs" - }, - "CmDetailsMessage" : { - "type" : "object", - "properties" : { - "vnfName" : { - "type" : "string", - "description" : "Name of the VNF." - }, - "status" : { - "type" : "string", - "description" : "Status of the VNF.", - "enum" : [ "See CMSStatusEnum" ] - }, - "tmChangeId" : { - "type" : "string", - "description" : "TM Change Id" - }, - "tmStatus" : { - "type" : "string", - "description" : "TM ticket status", - "enum" : [ "", "Closed" ] - }, - "tmApprovalStatus" : { - "type" : "string", - "description" : "TM ticket approval status", - "enum" : [ "", "Approved" ] - }, - "startTime" : { - "type" : "string", - "description" : "Start time of this VNF workflow assigned by Scheduler based upon the group start time returned by the optimizer and concurrency." - }, - "finishTime" : { - "type" : "string", - "description" : "Anticipated time of completion based upon start time and duration" - }, - "groupId" : { - "type" : "string", - "description" : "Name of the group of VNFs to be scheduled" - }, - "lastInstanceStartTime" : { - "type" : "string", - "description" : "The latest date/time by which a workflow is to be started." - }, - "policyId" : { - "type" : "string", - "description" : "Time of last poll for MSO status." - }, - "dispatchTime" : { - "type" : "string", - "description" : "Actual time the VNF workflow was dispatched." - }, - "executionCompletedTime" : { - "type" : "string", - "description" : "Actual time the VNF workflow execution was completed as reported by MSO." - }, - "msoRequestId" : { - "type" : "string", - "description" : "MSO Request ID of the workflow returned at dispatch time." - }, - "msoStatus" : { - "type" : "string", - "description" : "Final MSO status.", - "enum" : [ "COMPLETED", "FAILED" ] - }, - "msoMessage" : { - "type" : "string", - "description" : "MSO final status message." - }, - "statusMessage" : { - "type" : "string", - "description" : "Scheduler status message." - }, - "msoTime" : { - "type" : "string", - "description" : "Time of last poll for MSO status." - }, - "scheduleRequest" : { - "$ref" : "#/definitions/Schedule" - }, - "approvals" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Schedule Approval Request" - } - }, - "schedulesId" : { - "type" : "integer", - "format" : "int32" - } - } - }, - "Domain data" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "value" : { - "type" : "string" - } - }, - "description" : "Domain specific data represented as name/value pairs" - }, - "HealthCheckComponent" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "url" : { - "type" : "string" - }, - "status" : { - "type" : "string" - }, - "healthy" : { - "type" : "boolean" - } - } - }, - "HealthCheckMessage" : { - "type" : "object", - "properties" : { - "healthy" : { - "type" : "boolean" - }, - "buildInfo" : { - "type" : "string" - }, - "currentTime" : { - "type" : "string" - }, - "hostname" : { - "type" : "string" - }, - "components" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/HealthCheckComponent" - } - } - } - }, - "RequestError" : { - "type" : "object", - "properties" : { - "messageId" : { - "type" : "string" - }, - "text" : { - "type" : "string" - }, - "variables" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "Response from schedule optimizer" : { - "type" : "object", - "properties" : { - "transactionId" : { - "type" : "string", - "description" : "Unique id of optimization request." - }, - "scheduleId" : { - "type" : "string", - "description" : "Schedule id for which the optimization request was executed." - }, - "requestState" : { - "type" : "string", - "description" : "State of the request as reported by the optimizer." - }, - "status" : { - "type" : "string", - "description" : "Status of the request." - }, - "description" : { - "type" : "string", - "description" : "Description of the request status." - }, - "schedule" : { - "type" : "array", - "description" : "List of schedules returned, one per group. Only 1 group supported at this time.", - "items" : { - "$ref" : "#/definitions/CMSchedule" - } - } - }, - "description" : "Asynchronous response to schedule oprimizer request." - }, - "Schedule" : { - "type" : "object", - "properties" : { - "createDateTime" : { - "type" : "string", - "description" : "Date/time schedule was created." - }, - "optimizerDateTime" : { - "type" : "string" - }, - "optimizerMessage" : { - "type" : "string" - }, - "optimizerStatus" : { - "type" : "string" - }, - "optimizerReturnDateTime" : { - "type" : "string" - }, - "optimizerTransactionId" : { - "type" : "string" - }, - "schedule" : { - "type" : "string" - }, - "scheduleName" : { - "type" : "string" - }, - "scheduleInfo" : { - "type" : "string" - }, - "status" : { - "type" : "string" - }, - "userId" : { - "type" : "string" - }, - "domain" : { - "type" : "string" - }, - "deleteDateTime" : { - "type" : "string" - }, - "domainData" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Domain data" - } - }, - "scheduleApprovals" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Schedule Approval" - } - }, - "groups" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Change Management Group" - } - } - } - }, - "Schedule Approval" : { - "type" : "object", - "properties" : { - "approvalDateTime" : { - "type" : "string", - "description" : "Date/time schedule time slot was accepted/rejected." - }, - "status" : { - "type" : "string", - "description" : "Approval status.", - "enum" : [ "Accepted", "Rejected" ] - }, - "userId" : { - "type" : "string", - "description" : "ATTUID of the user accepting/rejecting the time slot." - } - }, - "description" : "Details of a schedule approval/rejection." - }, - "Schedule Approval Request" : { - "type" : "object", - "properties" : { - "approvalUserId" : { - "type" : "string", - "description" : "ATTUID of the user accepting/rejecting the time slot." - }, - "approvalStatus" : { - "type" : "string", - "description" : "Approval status.", - "enum" : [ "Accepted", "Rejected" ] - }, - "approvalType" : { - "type" : "string", - "description" : "Type of approval.", - "enum" : [ "Tier 2" ] - }, - "approvalDateTime" : { - "type" : "string", - "format" : "date-time" - } - }, - "description" : "Request to accept or reject an optimized time slot." - }, - "VNF Details" : { - "type" : "object", - "properties" : { - "groupId" : { - "type" : "string", - "description" : "Name of the list of VNFs to be changed as a group" - }, - "node" : { - "type" : "array", - "description" : "Lists of the VNF names to be changed", - "items" : { - "type" : "string" - } - }, - "changeWindow" : { - "type" : "array", - "description" : "Lists of desired change windows that the optimizer can select from. (Only 1 change window supported at this time)", - "items" : { - "$ref" : "#/definitions/Change Window" - } - } - }, - "description" : "Details and scheduling criteria for the VNFs to be changed." - } - } -} \ No newline at end of file diff --git a/docs/sections/swaggerdoc/oof-cmso-optimizer-api.json b/docs/sections/swaggerdoc/oof-cmso-optimizer-api.json new file mode 100644 index 0000000..d09fc87 --- /dev/null +++ b/docs/sections/swaggerdoc/oof-cmso-optimizer-api.json @@ -0,0 +1,538 @@ +{ + "swagger" : "2.0", + "info" : { + "version" : "2.0.0-SNAPSHOT", + "title" : "cmso-optimizer" + }, + "basePath" : "/optimizer", + "tags" : [ { + "name" : "Administration" + }, { + "name" : "Optimizer Interface" + } ], + "paths" : { + "/{apiVersion}/admin/{id}" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns encrypted value of id.", + "operationId" : "exec", + "produces" : [ "text/plain" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1|v2", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Identifier", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "string" + } + }, + "400" : { + "description" : "Request failed" + } + } + } + }, + "/{apiVersion}/health" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns health status of server.", + "operationId" : "healthCheck", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "checkInterfaces", + "in" : "query", + "description" : "Check Interfaces", + "required" : false, + "type" : "boolean", + "default" : true + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + }, + "400" : { + "description" : "Not healthy", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + } + } + } + }, + "/{apiVersion}/optimize/schedule" : { + "post" : { + "tags" : [ "Optimizer Interface" ], + "summary" : "", + "description" : "API to request schedule optimization for the passed elements.", + "operationId" : "optimizeSchedule", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "in" : "body", + "name" : "body", + "description" : "Optimization data.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Optimizer Request" + } + } ], + "responses" : { + "202" : { + "description" : "Accepted" + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/optimize/schedule/{id}" : { + "get" : { + "tags" : [ "Optimizer Interface" ], + "summary" : "", + "description" : "API to poll for optimized schedule.", + "operationId" : "getSchedule", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Request id", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Optimizer Response" + } + }, + "404" : { + "description" : "Not found.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "delete" : { + "tags" : [ "Optimizer Interface" ], + "summary" : "", + "description" : "API to acknowledge and delete optimized schedule request. Acknowledgesthat optimization has results have been retrieved an are safe to delete", + "operationId" : "deleteSchedule", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Request id", + "required" : true, + "type" : "string" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "404" : { + "description" : "Not found.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/policies" : { + "get" : { + "tags" : [ "Optimizer Interface" ], + "summary" : "", + "description" : "API to retrieve supported change management policies.", + "operationId" : "getPolicies", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Supported Policy Information" + } + } + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + } + }, + "definitions" : { + "Change Window" : { + "type" : "object", + "properties" : { + "startTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Earliest time for which changes may begin." + }, + "endTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Latest time by which all changes must be completed." + } + }, + "description" : "Time window for which tickets are to returned" + }, + "CmsoRequestError" : { + "type" : "object", + "properties" : { + "requestError" : { + "$ref" : "#/definitions/RequestError" + } + } + }, + "HealthCheckComponent" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "url" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "healthy" : { + "type" : "boolean" + } + } + }, + "HealthCheckMessage" : { + "type" : "object", + "properties" : { + "healthy" : { + "type" : "boolean" + }, + "buildInfo" : { + "type" : "string" + }, + "currentTime" : { + "type" : "string" + }, + "hostname" : { + "type" : "string" + }, + "components" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/HealthCheckComponent" + } + } + } + }, + "Name Value Data" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Name." + }, + "value" : { + "type" : "object", + "description" : "Value." + } + }, + "description" : "Instance of a name/value" + }, + "Optimizer Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "groupId" : { + "type" : "string", + "description" : "VNF group identifier." + } + }, + "description" : "Element to be scheduled." + }, + "Optimizer Request" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "concurrencyLimit" : { + "type" : "integer", + "format" : "int32", + "description" : "Concurrency limit for this request" + }, + "normalDuration" : { + "type" : "integer", + "format" : "int32", + "description" : "Expected duration of normal change" + }, + "additionalDuration" : { + "type" : "integer", + "format" : "int32", + "description" : "Additional duration for failed change" + }, + "commonData" : { + "type" : "array", + "description" : "Implementation specific name value pairs.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "changeWindows" : { + "type" : "array", + "description" : "Lists of desired change windows to schedule the elements.", + "items" : { + "$ref" : "#/definitions/Change Window" + } + }, + "elements" : { + "type" : "array", + "description" : "List of the elements to schedule.", + "items" : { + "$ref" : "#/definitions/Optimizer Element" + } + }, + "policies" : { + "type" : "array", + "description" : "List of the policies to control optimization.", + "items" : { + "$ref" : "#/definitions/Supported Policy Information" + } + } + }, + "description" : "Request to provide an \"conflict free\" schedule for passed elements." + }, + "Optimizer Response" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "status" : { + "type" : "string", + "description" : "Status of the optimization", + "enum" : [ "CREATED", "PENDING_TOPOLOGY", "TOPOLOGY_IN_PROGRESS", "PENDING_TICKETS", "TICKETS_IN_PROGRESS", "PENDING_OPTIMIZER", "OPTIMIZER_IN_PROGRESS", "COMPLETED", "FAILED", "DELETED" ] + }, + "errorMessage" : { + "type" : "string", + "description" : "Message for failed optimization" + }, + "schedules" : { + "type" : "array", + "description" : "List of schedules returned by the optimizer.", + "items" : { + "$ref" : "#/definitions/Optimizer Schedule Info" + } + } + }, + "description" : "Response to optimizer request for the requested elements." + }, + "Optimizer Schedule Info" : { + "type" : "object", + "properties" : { + "scheduledElements" : { + "type" : "array", + "description" : "Lists of elements with start times.", + "items" : { + "$ref" : "#/definitions/Scheduled Element" + } + }, + "unScheduledElements" : { + "type" : "array", + "description" : "Lists of elements that were not able to be scheduled.", + "items" : { + "$ref" : "#/definitions/Unscheduled Element" + } + } + }, + "description" : "Schedule Information returned from optimizer request." + }, + "RequestError" : { + "type" : "object", + "properties" : { + "messageId" : { + "type" : "string" + }, + "text" : { + "type" : "string" + }, + "variables" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, + "Scheduled Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "groupId" : { + "type" : "string", + "description" : "Group identifier" + }, + "scheduleType" : { + "type" : "string", + "enum" : [ "UNKNOWN", "GROUP_DISPATCH", "INDIVIDUAL" ] + }, + "startTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Earliest time for which changes may begin." + }, + "endTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Latest time by which all changes must be completed." + }, + "durationSeconds" : { + "type" : "integer", + "format" : "int64", + "description" : "Expected duration of change in seconds." + } + }, + "description" : "Scheduled element returned by the optimizer." + }, + "Supported Policy Information" : { + "type" : "object", + "properties" : { + "policyName" : { + "type" : "string", + "description" : "Policy name" + }, + "policyDescription" : { + "type" : "string", + "description" : "Policy description" + }, + "policyModifiers" : { + "type" : "array", + "description" : "Named values to modify/override policy attributes.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Policy Information returned from get policies API." + }, + "Unscheduled Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "groupId" : { + "type" : "string", + "description" : "Group identifier" + }, + "notScheduledReaons" : { + "type" : "array", + "description" : "List of reasons not able to schedule this element.", + "items" : { + "type" : "string", + "enum" : [ "ConcurrencyConstraint", "AvailabilityConstraint", "Other" ] + } + }, + "notScheduledMessages" : { + "type" : "array", + "description" : "List of messages not able to schedule this element.", + "items" : { + "type" : "string" + } + } + }, + "description" : "Scheduled element returned by the optimizer." + } + } +} \ No newline at end of file diff --git a/docs/sections/swaggerdoc/oof-cmso-service-api.json b/docs/sections/swaggerdoc/oof-cmso-service-api.json new file mode 100644 index 0000000..3168ecc --- /dev/null +++ b/docs/sections/swaggerdoc/oof-cmso-service-api.json @@ -0,0 +1,1234 @@ +{ + "swagger" : "2.0", + "info" : { + "version" : "2.0.0-SNAPSHOT", + "title" : "cmso-service" + }, + "basePath" : "/cmso", + "tags" : [ { + "name" : "CMSO Administration" + }, { + "name" : "CMSO Optimized Schedule API" + }, { + "name" : "CMSO Schedule API" + } ], + "paths" : { + "/{apiVersion}/admin/{id}" : { + "get" : { + "tags" : [ "CMSO Administration" ], + "summary" : "", + "description" : "Returns encrypted value of id.", + "operationId" : "exec", + "produces" : [ "text/plain" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1|v2", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Identifier", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "string" + } + }, + "400" : { + "description" : "Request failed" + } + } + } + }, + "/{apiVersion}/health" : { + "get" : { + "tags" : [ "CMSO Administration" ], + "summary" : "", + "description" : "Returns health status of server.", + "operationId" : "healthCheck", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "checkInterfaces", + "in" : "query", + "description" : "Check Interfaces", + "required" : false, + "type" : "array", + "items" : { + "type" : "boolean", + "default" : true + }, + "collectionFormat" : "multi" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + }, + "400" : { + "description" : "Not healthy", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + } + } + } + }, + "/{apiVersion}/schedules" : { + "get" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Returns a list of Scheduler Requests based upon the filter criteria.", + "operationId" : "searchScheduleRequests", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "includeDetails", + "in" : "query", + "description" : "Include details", + "required" : false, + "type" : "boolean", + "default" : false + }, { + "name" : "scheduleId", + "in" : "query", + "description" : "Schedule identifier", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "scheduleName", + "in" : "query", + "description" : "Schedule name", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "userId", + "in" : "query", + "description" : "SCheduler creator User id of ", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "status", + "in" : "query", + "description" : "Schedule status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "createDateTime", + "in" : "query", + "description" : "Creation date and time ([,])", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "optimizerStatus", + "in" : "query", + "description" : "Optimizer status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "WorkflowName", + "in" : "query", + "description" : "Workflow", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Schedule" + } + } + }, + "404" : { + "description" : "No records found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/schedules/optimized/{scheduleId}" : { + "post" : { + "tags" : [ "CMSO Optimized Schedule API" ], + "summary" : "", + "description" : "Creates a request for an optimized schedule", + "operationId" : "createScheduleRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "scheduleId", + "in" : "path", + "description" : "Schedule id to uniquely identify the schedule request being created.", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Data for creating a schedule request for the given schedule id", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Optimized Schedule Request" + } + } ], + "responses" : { + "202" : { + "description" : "Schedule request accepted for optimization." + }, + "409" : { + "description" : "Schedule request already exists for this schedule id.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/schedules/scheduleDetails" : { + "get" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Returns a list of Schedule request details based upon the filter criteria.", + "operationId" : "searchScheduleRequestDetails", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "request.scheduleId", + "in" : "query", + "description" : "Schedule identifier", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.scheduleName", + "in" : "query", + "description" : "Schedule name", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.userId", + "in" : "query", + "description" : "Scheduler creator User id of ", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.status", + "in" : "query", + "description" : "Schedule status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.createDateTime", + "in" : "query", + "description" : "Creation date and time ([,])", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.optimizerStatus", + "in" : "query", + "description" : "Optimizer status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.approvalUserId", + "in" : "query", + "description" : "Request Approval user id", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.approvalStatus", + "in" : "query", + "description" : "Request Approval status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "request.approvalType", + "in" : "query", + "description" : "Request Approval type", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "WorkflowName", + "in" : "query", + "description" : "Workflow", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "vnfName", + "in" : "query", + "description" : "VNF Name", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "vnfId", + "in" : "query", + "description" : "VNF Id", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "vnfStatus", + "in" : "query", + "description" : "VNF Status", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "startTime", + "in" : "query", + "description" : "Start time ,", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "finishTime", + "in" : "query", + "description" : "Finish time ,", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "lastInstanceTime", + "in" : "query", + "description" : "Last instance start time ,", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "tmChangeId", + "in" : "query", + "description" : "TM Change Ticket Change Id", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "maxSchedules", + "in" : "query", + "description" : "Maximum number of schedules to return", + "required" : false, + "type" : "integer", + "format" : "int32" + }, { + "name" : "lastScheduleId", + "in" : "query", + "description" : "Return schedules > lastScheduleId", + "required" : false, + "type" : "string" + }, { + "name" : "request.concurrencyLimit", + "in" : "query", + "description" : "Return concurrencyLimit", + "required" : false, + "type" : "integer", + "format" : "int32" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/CmDetailsMessage" + } + } + }, + "404" : { + "description" : "No records found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/schedules/{scheduleId}" : { + "get" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Retrieve the schedule request for scheduleId", + "operationId" : "getScheduleRequestInfo", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "scheduleId", + "in" : "path", + "description" : "Schedule id to uniquely identify the schedule info being retrieved.", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Schedule" + } + }, + "404" : { + "description" : "No record found" + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "post" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Creates a schedule request for scheduleId", + "operationId" : "createScheduleRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "scheduleId", + "in" : "path", + "description" : "Schedule id to uniquely identify the schedule request being created.", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Data for creating a schedule request for the given schedule id", + "required" : false, + "schema" : { + "$ref" : "#/definitions/CmsoMessage" + } + } ], + "responses" : { + "202" : { + "description" : "Schedule request accepted for optimization." + }, + "409" : { + "description" : "Schedule request already exists for this schedule id.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "delete" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Cancels the schedule request for scheduleId", + "operationId" : "deleteScheduleRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "scheduleId", + "in" : "path", + "description" : "Schedule id to uniquely identify the schedule request being deleted.", + "required" : true, + "type" : "string" + } ], + "responses" : { + "204" : { + "description" : "Delete successful" + }, + "404" : { + "description" : "No record found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/schedules/{scheduleId}/approvals" : { + "post" : { + "tags" : [ "CMSO Schedule API" ], + "summary" : "", + "description" : "Adds an accept/reject approval status to the schedule request identified by scheduleId", + "operationId" : "approveScheduleRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "scheduleId", + "in" : "path", + "description" : "Schedule id to uniquely identify the schedule request being accepted or rejected.", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Accept or reject approval message", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Schedule Approval Request" + } + } ], + "responses" : { + "200" : { + "description" : "OK" + }, + "404" : { + "description" : "No record found" + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + } + }, + "definitions" : { + "Change Management Group" : { + "type" : "object", + "properties" : { + "finishTime" : { + "type" : "string", + "description" : "Date/time by which all of the workflows should be completed." + }, + "groupId" : { + "type" : "string", + "description" : "Name of the group of VNFs to be scheduled" + }, + "lastInstanceStartTime" : { + "type" : "string", + "description" : "The latest date/time by which a workflow is to be started." + }, + "startTime" : { + "type" : "string", + "description" : "The date/time when workflows are to be started." + }, + "additionalDurationInSecs" : { + "type" : "integer", + "format" : "int32", + "description" : "Time added to the workflow interval to allow for rollback in case of failure." + }, + "concurrencyLimit" : { + "type" : "integer", + "format" : "int32", + "description" : "The maximum number of workflows that should be started simultaneiously." + }, + "normalDurationInSecs" : { + "type" : "integer", + "format" : "int32", + "description" : "Expected duration of a successful workflow execution." + }, + "policyId" : { + "type" : "string", + "description" : "The name of the schedule optimization policy used by the change management schedule optimizer." + }, + "changeManagementSchedules" : { + "type" : "array", + "description" : "The list of VNF workflows scheduled.", + "items" : { + "$ref" : "#/definitions/Change Management Schedule" + } + } + }, + "description" : "Scheduling critirea for a group of VNFs" + }, + "Change Management Schedule" : { + "type" : "object", + "properties" : { + "tmChangeId" : { + "type" : "string", + "description" : "TM Change Id" + }, + "tmStatus" : { + "type" : "string", + "description" : "TM ticket status", + "enum" : [ "", "Closed" ] + }, + "tmApprovalStatus" : { + "type" : "string", + "description" : "TM ticket approval status", + "enum" : [ "", "Approved" ] + }, + "finishTime" : { + "type" : "string", + "description" : "Anticipated time of completion based upon start time and duration" + }, + "startTime" : { + "type" : "string", + "description" : "Start time of this VNF workflow assigned by Scheduler based upon the group start time returned by the optimizer and concurrency." + }, + "status" : { + "type" : "string", + "description" : "Status of the VNF.", + "enum" : [ "See CMSStatusEnum" ] + }, + "vnfName" : { + "type" : "string", + "description" : "Name of the VNF." + }, + "dispatchTime" : { + "type" : "string", + "description" : "Actual time the VNF workflow was dispatched." + }, + "executionCompletedTime" : { + "type" : "string", + "description" : "Actual time the VNF workflow execution was completed as reported by MSO." + }, + "msoRequestId" : { + "type" : "string", + "description" : "MSO Request ID of the workflow returned at dispatch time." + }, + "msoStatus" : { + "type" : "string", + "description" : "Final MSO status.", + "enum" : [ "COMPLETED", "FAILED" ] + }, + "msoMessage" : { + "type" : "string", + "description" : "MSO final status message." + }, + "statusMessage" : { + "type" : "string", + "description" : "Scheduler status message." + }, + "msoTime" : { + "type" : "string", + "description" : "Time of last poll for MSO status." + }, + "request" : { + "type" : "string", + "description" : "Change equest." + } + }, + "description" : "VNF details for Change Management Schedule" + }, + "Change Management Scheduling Info" : { + "type" : "object", + "properties" : { + "normalDurationInSeconds" : { + "type" : "integer", + "format" : "int32", + "description" : "Expected duration (in seconds) of a successful execution of a single VNF change." + }, + "additionalDurationInSeconds" : { + "type" : "integer", + "format" : "int32", + "description" : "Additional duration (in seconds) to be added to support backout of an unsuccessful VNF change." + }, + "concurrencyLimit" : { + "type" : "integer", + "format" : "int32", + "description" : "Maximum number of VNF changes to schedule concurrently" + }, + "changeWindows" : { + "type" : "array", + "description" : "Lists of desired change windows to schedule the elements.", + "items" : { + "$ref" : "#/definitions/Change Window" + } + }, + "policies" : { + "type" : "array", + "description" : "List of the policies to control optimization.", + "items" : { + "$ref" : "#/definitions/Supported Policy Information" + } + }, + "elements" : { + "type" : "array", + "description" : "Lists of the VNFs to be changed and the desired change windows", + "items" : { + "$ref" : "#/definitions/Optimizer Element" + } + } + }, + "description" : "Details of schedule being requested" + }, + "Change Window" : { + "type" : "object", + "properties" : { + "startTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Earliest time for which changes may begin." + }, + "endTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Latest time by which all changes must be completed." + } + }, + "description" : "Time window for which tickets are to returned" + }, + "CmDetailsMessage" : { + "type" : "object", + "properties" : { + "vnfName" : { + "type" : "string", + "description" : "Name of the VNF." + }, + "status" : { + "type" : "string", + "description" : "Status of the VNF.", + "enum" : [ "See CMSStatusEnum" ] + }, + "tmChangeId" : { + "type" : "string", + "description" : "TM Change Id" + }, + "tmStatus" : { + "type" : "string", + "description" : "TM ticket status", + "enum" : [ "", "Closed" ] + }, + "tmApprovalStatus" : { + "type" : "string", + "description" : "TM ticket approval status", + "enum" : [ "", "Approved" ] + }, + "startTime" : { + "type" : "string", + "description" : "Start time of this VNF workflow assigned by Scheduler based upon the group start time returned by the optimizer and concurrency." + }, + "finishTime" : { + "type" : "string", + "description" : "Anticipated time of completion based upon start time and duration" + }, + "groupId" : { + "type" : "string", + "description" : "Name of the group of VNFs to be scheduled" + }, + "lastInstanceStartTime" : { + "type" : "string", + "description" : "The latest date/time by which a workflow is to be started." + }, + "policyId" : { + "type" : "string", + "description" : "Time of last poll for MSO status." + }, + "dispatchTime" : { + "type" : "string", + "description" : "Actual time the VNF workflow was dispatched." + }, + "executionCompletedTime" : { + "type" : "string", + "description" : "Actual time the VNF workflow execution was completed as reported by MSO." + }, + "msoRequestId" : { + "type" : "string", + "description" : "MSO Request ID of the workflow returned at dispatch time." + }, + "msoStatus" : { + "type" : "string", + "description" : "Final MSO status.", + "enum" : [ "COMPLETED", "FAILED" ] + }, + "msoMessage" : { + "type" : "string", + "description" : "MSO final status message." + }, + "statusMessage" : { + "type" : "string", + "description" : "Scheduler status message." + }, + "msoTime" : { + "type" : "string", + "description" : "Time of last poll for MSO status." + }, + "scheduleRequest" : { + "$ref" : "#/definitions/Schedule" + }, + "approvals" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Schedule Approval Request" + } + } + } + }, + "CmsoMessage" : { + "type" : "object", + "properties" : { + "domain" : { + "type" : "string", + "description" : "Schedule domain : ChangeManagement" + }, + "scheduleId" : { + "type" : "string", + "description" : "Schedule id that must be unique within the domain. Use of UUID is highly recommended." + }, + "scheduleName" : { + "type" : "string", + "description" : "User provided name of the schedule (deaults to scheduleId" + }, + "userId" : { + "type" : "string", + "description" : "ATTUID of the user requesting the schedule." + }, + "domainData" : { + "type" : "array", + "description" : "Domain data as name value/pairs. (i.e. CallbackUrl, CallbackData, WorkflowName)", + "items" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "schedulingInfo" : { + "$ref" : "#/definitions/Change Management Scheduling Info" + } + } + }, + "CmsoRequestError" : { + "type" : "object", + "properties" : { + "requestError" : { + "$ref" : "#/definitions/RequestError" + } + } + }, + "Domain data" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "value" : { + "type" : "string" + } + }, + "description" : "Domain specific data represented as name/value pairs" + }, + "HealthCheckComponent" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "url" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "healthy" : { + "type" : "boolean" + } + } + }, + "HealthCheckMessage" : { + "type" : "object", + "properties" : { + "healthy" : { + "type" : "boolean" + }, + "buildInfo" : { + "type" : "string" + }, + "currentTime" : { + "type" : "string" + }, + "hostname" : { + "type" : "string" + }, + "components" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/HealthCheckComponent" + } + } + } + }, + "Name Value Data" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Name." + }, + "value" : { + "type" : "object", + "description" : "Value." + } + }, + "description" : "Instance of a name/value" + }, + "Optimized Schedule Request" : { + "type" : "object", + "properties" : { + "domain" : { + "type" : "string", + "description" : "Schedule domain : ChangeManagement" + }, + "scheduleId" : { + "type" : "string", + "description" : "Schedule id that must be unique within the domain. Use of UUID is highly recommended." + }, + "scheduleName" : { + "type" : "string", + "description" : "User provided name of the schedule (deaults to scheduleId" + }, + "userId" : { + "type" : "string", + "description" : "ATTUID of the user requesting the schedule." + }, + "commonData" : { + "type" : "array", + "description" : "Implementation specific name value pairs.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "schedulingData" : { + "description" : "Scheduling data.", + "$ref" : "#/definitions/Change Management Scheduling Info" + } + }, + "description" : "Request to schedule VNF change management workflow(s)." + }, + "Optimizer Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "request" : { + "type" : "object", + "description" : "Request for be scheduled." + }, + "groupId" : { + "type" : "string", + "description" : "VNF group identifier." + } + }, + "description" : "Element to be scheduled." + }, + "RequestError" : { + "type" : "object", + "properties" : { + "messageId" : { + "type" : "string" + }, + "text" : { + "type" : "string" + }, + "variables" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, + "Schedule" : { + "type" : "object", + "properties" : { + "createDateTime" : { + "type" : "string", + "description" : "Date/time schedule was created." + }, + "optimizerDateTime" : { + "type" : "string" + }, + "optimizerMessage" : { + "type" : "string" + }, + "optimizerStatus" : { + "type" : "string" + }, + "optimizerReturnDateTime" : { + "type" : "string" + }, + "optimizerTransactionId" : { + "type" : "string" + }, + "schedule" : { + "type" : "string" + }, + "scheduleName" : { + "type" : "string" + }, + "scheduleInfo" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "userId" : { + "type" : "string" + }, + "domain" : { + "type" : "string" + }, + "deleteDateTime" : { + "type" : "string" + }, + "domainData" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Domain data" + } + }, + "scheduleApprovals" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Schedule Approval" + } + }, + "groups" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Change Management Group" + } + } + } + }, + "Schedule Approval" : { + "type" : "object", + "properties" : { + "approvalDateTime" : { + "type" : "string", + "description" : "Date/time schedule time slot was accepted/rejected." + }, + "status" : { + "type" : "string", + "description" : "Approval status.", + "enum" : [ "Accepted", "Rejected" ] + }, + "userId" : { + "type" : "string", + "description" : "ATTUID of the user accepting/rejecting the time slot." + } + }, + "description" : "Details of a schedule approval/rejection." + }, + "Schedule Approval Request" : { + "type" : "object", + "properties" : { + "approvalUserId" : { + "type" : "string", + "description" : "ATTUID of the user accepting/rejecting the time slot." + }, + "approvalStatus" : { + "type" : "string", + "description" : "Approval status.", + "enum" : [ "Accepted", "Rejected" ] + }, + "approvalType" : { + "type" : "string", + "description" : "Type of approval.", + "enum" : [ "Tier 2" ] + }, + "approvalDateTime" : { + "type" : "string", + "format" : "date-time" + } + }, + "description" : "Request to accept or reject an optimized time slot." + }, + "Supported Policy Information" : { + "type" : "object", + "properties" : { + "policyName" : { + "type" : "string", + "description" : "Policy name" + }, + "policyModifiers" : { + "type" : "array", + "description" : "Named values to modify/override policy attributes.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Policy Information returned from get policies API." + }, + "VNF Details" : { + "type" : "object", + "properties" : { + "groupId" : { + "type" : "string", + "description" : "Name of the list of VNFs to be changed as a group" + }, + "node" : { + "type" : "array", + "description" : "Lists of the VNF names to be changed", + "items" : { + "type" : "string" + } + }, + "changeWindow" : { + "type" : "array", + "description" : "Lists of desired change windows that the optimizer can select from. (Only 1 change window supported at this time)", + "items" : { + "$ref" : "#/definitions/Change Window" + } + } + }, + "description" : "Details and scheduling criteria for the VNFs to be changed." + } + } +} \ No newline at end of file diff --git a/docs/sections/swaggerdoc/oof-cmso-ticketmgt-api.json b/docs/sections/swaggerdoc/oof-cmso-ticketmgt-api.json new file mode 100644 index 0000000..24dc2f2 --- /dev/null +++ b/docs/sections/swaggerdoc/oof-cmso-ticketmgt-api.json @@ -0,0 +1,670 @@ +{ + "swagger" : "2.0", + "info" : { + "version" : "2.0.0-SNAPSHOT", + "title" : "cmso-ticketmgt" + }, + "basePath" : "/ticketmgt", + "tags" : [ { + "name" : "Administration" + }, { + "name" : "Availability Interface" + }, { + "name" : "Ticket Management" + } ], + "paths" : { + "/{apiVersion}/activetickets" : { + "post" : { + "tags" : [ "Availability Interface" ], + "summary" : "Request Active Tickets", + "description" : "API to support conflict avoidance. Retrieves the active ticket data for the passed criteria to detemine availability of passed elements within the passed time window.\nIf the request results in asynchronous processging, IN_PROGRESS status will be returned and the optimizer will begin to poll the request until COMPLETED.", + "operationId" : "getActiveTickets", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "in" : "body", + "name" : "body", + "description" : "Active ticket criteria (elements and change windows).", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Ticket Management Request" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Ticket Management Response" + } + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/activetickets/{id}" : { + "get" : { + "tags" : [ "Availability Interface" ], + "summary" : "Poll Active Tickets Request", + "description" : "Poll for the status of the request id. Optimizser will poll until status is COMPLETED and issue acknowledge (DELETE) API to acknowledge the receipt of the response.", + "operationId" : "pollActiveTickets", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Active tickets request id.", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Ticket Management Response" + } + }, + "404" : { + "description" : "Not found.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "delete" : { + "tags" : [ "Availability Interface" ], + "summary" : "Acknowledge Active Tickets Response", + "description" : "API call used to acknowledge the receipt of a COMPLETED asynchronous request to enable the Ticket Management service to remove it from their cache. The service may remove from the cache on the poll request. The optimizer will treat Not found reponse on as normal.", + "operationId" : "deleteActiveTicketsRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Active tickets request id.", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Ticket Management Response" + } + }, + "204" : { + "description" : "OK" + }, + "404" : { + "description" : "Not found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/admin/{id}" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns encrypted value of id.", + "operationId" : "exec", + "produces" : [ "text/plain" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1|v2", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Identifier", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "string" + } + }, + "400" : { + "description" : "Request failed" + } + } + } + }, + "/{apiVersion}/health" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns health status of server.", + "operationId" : "healthCheck", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "checkInterfaces", + "in" : "query", + "description" : "Check Interfaces", + "required" : false, + "type" : "boolean", + "default" : true + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + }, + "400" : { + "description" : "Not healthy", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + } + } + } + }, + "/{apiVersion}/ticket" : { + "post" : { + "tags" : [ "Ticket Management" ], + "summary" : "Create Ticket", + "description" : "Creates a ticket for the passed data", + "operationId" : "createTicket", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "in" : "body", + "name" : "body", + "description" : "Data for creating a ticket", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Ticket Data" + } + } ], + "responses" : { + "200" : { + "description" : "Ticket Created. Ticket Id returned.", + "schema" : { + "$ref" : "#/definitions/Ticket Data" + } + }, + "400" : { + "description" : "Bad request.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "put" : { + "tags" : [ "Ticket Management" ], + "summary" : "Update Ticket", + "description" : "Updates a ticket to the passed data", + "operationId" : "updateTicket", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "in" : "body", + "name" : "body", + "description" : "Data for updating a ticket", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Ticket Data" + } + } ], + "responses" : { + "204" : { + "description" : "Ticket Updated." + }, + "400" : { + "description" : "Bad request.", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/ticket/{id}" : { + "get" : { + "tags" : [ "Ticket Management" ], + "summary" : "Fetch Ticket", + "description" : "Returns ticket information for the provided ticket id.", + "operationId" : "fetchTicket", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Unique ticket identifier", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Ticket Data" + } + }, + "404" : { + "description" : "No record found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "delete" : { + "tags" : [ "Ticket Management" ], + "summary" : "Cancel the ticket", + "description" : "Cancels the ticket.", + "operationId" : "deleteScheduleRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Ticket id to uniquely identify the ticket being deleted.", + "required" : true, + "type" : "string" + } ], + "responses" : { + "204" : { + "description" : "Delete successful" + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "404" : { + "description" : "No record found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/tickets" : { + "get" : { + "tags" : [ "Ticket Management" ], + "summary" : "Search Tickets", + "description" : "Returns a list of based upon the filter criteria.", + "operationId" : "searchTcikets", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "query", + "description" : "Ticket identifier", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "elementId", + "in" : "query", + "description" : "Element Id", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "startTime", + "in" : "query", + "description" : "Start time ,", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "finishTime", + "in" : "query", + "description" : "Finish time ,", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "maxTickets", + "in" : "query", + "description" : "Maximum number of tickets to return", + "required" : false, + "type" : "integer", + "format" : "int32" + }, { + "name" : "lastId", + "in" : "query", + "description" : "Return tickets > last id", + "required" : false, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Ticket Data" + } + } + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + } + }, + "definitions" : { + "Change Window" : { + "type" : "object", + "properties" : { + "startTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Earliest time for which changes may begin." + }, + "endTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Latest time by which all changes must be completed." + } + }, + "description" : "Time window for which tickets are to returned" + }, + "CmsoRequestError" : { + "type" : "object", + "properties" : { + "requestError" : { + "$ref" : "#/definitions/RequestError" + } + } + }, + "Element Critera" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element id unique to the request." + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Element criteria for retrieving active tickets." + }, + "HealthCheckComponent" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "url" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "healthy" : { + "type" : "boolean" + } + } + }, + "HealthCheckMessage" : { + "type" : "object", + "properties" : { + "healthy" : { + "type" : "boolean" + }, + "buildInfo" : { + "type" : "string" + }, + "currentTime" : { + "type" : "string" + }, + "hostname" : { + "type" : "string" + }, + "components" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/HealthCheckComponent" + } + } + } + }, + "Name Value Data" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Name." + }, + "value" : { + "type" : "object", + "description" : "Value." + } + }, + "description" : "Instance of a name/value" + }, + "RequestError" : { + "type" : "object", + "properties" : { + "messageId" : { + "type" : "string" + }, + "text" : { + "type" : "string" + }, + "variables" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, + "Ticket Data" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "Unique ticket identifier" + }, + "startTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Scheduled start time of change." + }, + "endTime" : { + "type" : "string", + "format" : "date-time", + "description" : "Scheduled end time of change." + }, + "availability" : { + "type" : "string", + "description" : "Availability of element(s) during change window", + "enum" : [ "full", "partial", "unavailable" ] + }, + "elementIds" : { + "type" : "array", + "description" : "List elementIds of elements being changed. At least one maps to elementId in the request", + "items" : { + "type" : "string" + } + }, + "changeDetails" : { + "type" : "string", + "description" : "Details of the change." + } + }, + "description" : "Change Management Ticket Information." + }, + "Ticket Management Request" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "commonData" : { + "type" : "array", + "description" : "Implementation specific name value pairs provided to be passed to Ticket Management query .", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "changeWindows" : { + "type" : "array", + "description" : "Lists of desired change windows for which TicketData will be returned.", + "items" : { + "$ref" : "#/definitions/Change Window" + } + }, + "elements" : { + "type" : "array", + "description" : "List of the elements for which TicketData will be returned.", + "items" : { + "$ref" : "#/definitions/Element Critera" + } + } + }, + "description" : "Request to retrieve active tickets for the provided elements." + }, + "Ticket Management Response" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "elements" : { + "type" : "array", + "description" : "List of TicketData for the requested elements. A single ticket may apply to more than 1 passed elementId.", + "items" : { + "$ref" : "#/definitions/Ticket Data" + } + }, + "status" : { + "type" : "string", + "description" : "Status of ticket request. IN_PROGRESS will indicate asynchronous processing is required.", + "enum" : [ "IN_PROGESS", "COMPLETED", "FAILED" ] + }, + "pollingSeconds" : { + "type" : "integer", + "format" : "int32", + "description" : "If request is asynchronous (IN_PROGRESS), suggested interval to the next poll." + } + }, + "description" : "Response to active ticket query for the requested elements." + } + } +} \ No newline at end of file diff --git a/docs/sections/swaggerdoc/oof-cmso-topology.json b/docs/sections/swaggerdoc/oof-cmso-topology.json new file mode 100644 index 0000000..c99ec67 --- /dev/null +++ b/docs/sections/swaggerdoc/oof-cmso-topology.json @@ -0,0 +1,516 @@ +{ + "swagger" : "2.0", + "info" : { + "version" : "2.0.0-SNAPSHOT", + "title" : "cmso-topology" + }, + "basePath" : "/topology", + "tags" : [ { + "name" : "Administration" + }, { + "name" : "Topology Interface" + } ], + "paths" : { + "/{apiVersion}/admin/{id}" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns encrypted value of id.", + "operationId" : "exec", + "produces" : [ "text/plain" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1|v2", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Identifier", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "type" : "string" + } + }, + "400" : { + "description" : "Request failed" + } + } + } + }, + "/{apiVersion}/current" : { + "post" : { + "tags" : [ "Topology Interface" ], + "summary" : "Request Topology", + "description" : "API to retrieve toplogy for scheduling 'conflict free' mainentance. Retrieves the element information related to the list of elements targeted for mainenance activity. Scope of related elements to be returned are defined in the passed ToplogogyRequest. Elements returned must include in the elementData, the identifier that the element is known as in the ticket management system.\nThe Topology Service may implement asynchronous requests by returning IN_PROGRESS status. If IN_PROGRESS, the optimizer will begin polling until COMPLETED is returned with the response. ", + "operationId" : "retrieveCurrentTopology", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "in" : "body", + "name" : "body", + "description" : "Topology criteria.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/Topology Request" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Topology Response" + } + }, + "400" : { + "description" : "Bad request", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/current/request/{id}" : { + "get" : { + "tags" : [ "Topology Interface" ], + "summary" : "Poll Asynchronous Topology Request", + "description" : "If a topology request results in asynchronous request (IN_PROGRESS) this GET is used to retrieve status until COMPLETED. At which time, the optimizer will issue a DELETE to acknowledge receipt.\nThe Topology Service implementation may delete the cache when returning completed. The optimizer will treat subsequent not found on delete as normal.", + "operationId" : "getTopologyRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Request Id", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Topology Response" + } + }, + "404" : { + "description" : "Not Found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + }, + "delete" : { + "tags" : [ "Topology Interface" ], + "summary" : "Acknowledge Topology Response", + "description" : "API to acknowledge COMPLETED toplogy request.", + "operationId" : "deleteTopologyRequest", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "id", + "in" : "path", + "description" : "Request Id", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/Topology Response" + } + }, + "404" : { + "description" : "Not Found", + "schema" : { + "$ref" : "#/definitions/CmsoRequestError" + } + }, + "500" : { + "description" : "Unexpected Runtime error" + } + } + } + }, + "/{apiVersion}/health" : { + "get" : { + "tags" : [ "Administration" ], + "summary" : "", + "description" : "Returns health status of server.", + "operationId" : "healthCheck", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "apiVersion", + "in" : "path", + "description" : "v1", + "required" : true, + "type" : "string", + "default" : "v1" + }, { + "name" : "checkInterfaces", + "in" : "query", + "description" : "Check Interfaces", + "required" : false, + "type" : "boolean", + "default" : true + } ], + "responses" : { + "200" : { + "description" : "OK", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + }, + "400" : { + "description" : "Not healthy", + "schema" : { + "$ref" : "#/definitions/HealthCheckMessage" + } + } + } + } + } + }, + "definitions" : { + "CmsoRequestError" : { + "type" : "object", + "properties" : { + "requestError" : { + "$ref" : "#/definitions/RequestError" + } + } + }, + "Element Critera" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element id unique to the request." + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Element criteria for retrieving topology." + }, + "Element Location" : { + "type" : "object", + "properties" : { + "lat" : { + "type" : "number", + "format" : "float", + "description" : "Geographic latitude of element." + }, + "lon" : { + "type" : "number", + "format" : "float", + "description" : "Geographic longitude of element." + }, + "timezone" : { + "type" : "string", + "description" : "Timezone." + } + }, + "description" : "Location information necessary to determine timezone. lat/lon and/or timezone must be provided" + }, + "HealthCheckComponent" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "url" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "healthy" : { + "type" : "boolean" + } + } + }, + "HealthCheckMessage" : { + "type" : "object", + "properties" : { + "healthy" : { + "type" : "boolean" + }, + "buildInfo" : { + "type" : "string" + }, + "currentTime" : { + "type" : "string" + }, + "hostname" : { + "type" : "string" + }, + "components" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/HealthCheckComponent" + } + } + } + }, + "Name Value Data" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Name." + }, + "value" : { + "type" : "object", + "description" : "Value." + } + }, + "description" : "Instance of a name/value" + }, + "RequestError" : { + "type" : "object", + "properties" : { + "messageId" : { + "type" : "string" + }, + "text" : { + "type" : "string" + }, + "variables" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, + "Supported Policy Information" : { + "type" : "object", + "properties" : { + "policyName" : { + "type" : "string", + "description" : "Policy name" + }, + "policyDescription" : { + "type" : "string", + "description" : "Policy description" + }, + "policyModifiers" : { + "type" : "array", + "description" : "Named values to modify/override policy attributes.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Policy Information returned from get policies API." + }, + "Topology Constraint ELements" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "constraintType" : { + "type" : "string", + "description" : "Type of constraint." + }, + "constraintTypeMinimum" : { + "type" : "integer", + "format" : "int32", + "description" : "If more than one instance of constraintType, minimum number of available instances required. Useful for identifying availableBackup elements, service paths." + }, + "optimizerAvailabilityMatrixName" : { + "type" : "string", + "description" : "Availability matrix name. Availability matrix will not be passed to optimizer engine. Generally useful for global concurrency type constraints." + }, + "availabilityMatrixScope" : { + "type" : "string", + "description" : "Availability matrix scope global or scoped per elementId.", + "enum" : [ "NONE", "GLOBAL", "ELEMENT" ] + }, + "elementAvailabilityAggreagation" : { + "type" : "boolean", + "description" : "Availability matrix is aggregated into element availability marrix." + }, + "elements" : { + "type" : "array", + "description" : "Elements ", + "items" : { + "type" : "string" + } + } + }, + "description" : "Constraining Element Information returned from TopologyRequuest." + }, + "Topology Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "elementLocation" : { + "description" : "Location information for the element.", + "$ref" : "#/definitions/Element Location" + }, + "requiredElements" : { + "type" : "array", + "description" : "List of related elements required to be available to execute the chenge.", + "items" : { + "type" : "string" + } + }, + "constraintElements" : { + "type" : "array", + "description" : "Lists of related elements that must be available to avoid network outage while executing the change. Each set constraint elements", + "items" : { + "$ref" : "#/definitions/Topology Constraint ELements" + } + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + } + }, + "description" : "Element Information returned from TopologyRequuest." + }, + "Topology Related Element" : { + "type" : "object", + "properties" : { + "elementId" : { + "type" : "string", + "description" : "Element identifier" + }, + "elementLocation" : { + "description" : "Location information for the element.", + "$ref" : "#/definitions/Element Location" + }, + "elementData" : { + "type" : "array", + "description" : "Implementation specific element data.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "relatedElements" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + }, + "description" : "Element Information returned from TopologyRequuest." + }, + "Topology Request" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "commonData" : { + "type" : "array", + "description" : "Implementation specific name value pairs.", + "items" : { + "$ref" : "#/definitions/Name Value Data" + } + }, + "elements" : { + "type" : "array", + "description" : "List of the elements for which topology information is requested.", + "items" : { + "$ref" : "#/definitions/Element Critera" + } + }, + "policies" : { + "type" : "array", + "description" : "List of the policies to control topology retrieve.", + "items" : { + "$ref" : "#/definitions/Supported Policy Information" + } + } + }, + "description" : "Request to retrieve topology information for the provided elements." + }, + "Topology Response" : { + "type" : "object", + "properties" : { + "requestId" : { + "type" : "string", + "description" : "Unique Id of the request" + }, + "elements" : { + "type" : "array", + "description" : "List of elements for for which topology has been requested.", + "items" : { + "$ref" : "#/definitions/Topology Element" + } + }, + "referencedElements" : { + "type" : "array", + "description" : "List of referenced elements representing the topology that has been requested.", + "items" : { + "$ref" : "#/definitions/Topology Related Element" + } + }, + "status" : { + "type" : "string", + "description" : "Status of asynchronous request. COMPLETED is returned on initial synchonous request. If IN_PROGRESS is returned, the optimizer will enter asynchronous polling mode.", + "enum" : [ "IN_PROGRESS", "COMPLETED", "FAILED" ] + }, + "errorMessage" : { + "type" : "string", + "description" : "FAILED request error message." + }, + "pollingSeconds" : { + "type" : "integer", + "format" : "int32", + "description" : "If request is asynchronous (IN_PROGRESS), suggested interval to the next poll." + } + }, + "description" : "Response to topology query for the requested elements." + } + } +} \ No newline at end of file -- cgit 1.2.3-korg