diff options
author | Jerry Flood <jflood@att.com> | 2020-01-24 11:18:07 -0500 |
---|---|---|
committer | vrvarma <vikas.varma@att.com> | 2020-03-05 09:50:29 -0500 |
commit | e761afa8019ce5585027a2c5e04ef463b703d3de (patch) | |
tree | a6e80dce9c0bef1c35447dc49f2d340690cccb96 /cmso-ticketmgt | |
parent | 29482785f9e18a1100fe0ea4695dfaf348e60aa6 (diff) |
Update project for java11
Issue-ID: OPTFRA-620
Change-Id: Ib50c197e9582fcc1917d8d81e949c9b961a2cbd2
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-ticketmgt')
-rw-r--r-- | cmso-ticketmgt/src/main/docker/Dockerfile | 4 | ||||
-rw-r--r-- | cmso-ticketmgt/src/main/resources/META-INF/resources/swagger/swagger.json | 670 |
2 files changed, 672 insertions, 2 deletions
diff --git a/cmso-ticketmgt/src/main/docker/Dockerfile b/cmso-ticketmgt/src/main/docker/Dockerfile index 7dd0faa..86f04dd 100644 --- a/cmso-ticketmgt/src/main/docker/Dockerfile +++ b/cmso-ticketmgt/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 MAINTAINER "The Onap Team" LABEL Description="This image contains ubuntu 16.04 with the openjdk installed" Version="16.04-8" @@ -14,7 +14,7 @@ ENV https_proxy=$HTTPS_PROXY RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \ apt-get update && \ apt-get -y dist-upgrade && \ - apt-get install -y openjdk-8-jre-headless && \ + apt-get install -y openjdk-11-jre-headless && \ apt-get install -y curl COPY onap-cmso-tm/cmso-ticketmgt.jar ${APP_HOME}/app.jar diff --git a/cmso-ticketmgt/src/main/resources/META-INF/resources/swagger/swagger.json b/cmso-ticketmgt/src/main/resources/META-INF/resources/swagger/swagger.json new file mode 100644 index 0000000..0580b82 --- /dev/null +++ b/cmso-ticketmgt/src/main/resources/META-INF/resources/swagger/swagger.json @@ -0,0 +1,670 @@ +{ + "swagger" : "2.0", + "info" : { + "version" : "2.1.1-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 <low>,<high>", + "required" : false, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "multi" + }, { + "name" : "finishTime", + "in" : "query", + "description" : "Finish time <low>,<high>", + "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 |