diff options
author | 2017-08-22 17:42:43 -0400 | |
---|---|---|
committer | 2017-08-22 17:44:46 -0400 | |
commit | 7506eae7723fc4e8c1bd7952fe93c4924ea29cda (patch) | |
tree | 0a52a0f32cbd896c8149b64fa981630ab64393c7 /resources | |
parent | a30008bfaac90f9acc068dda471552fc68cb98cc (diff) |
[CCSDK-36] seedcode for northbound api
Change-Id: If48afb138dbab2fb1eed4d3591f02524489e994e
Signed-off-by: VENKATESH KUMAR <vv770d@att.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/cloudifyhelp.txt | 141 | ||||
-rw-r--r-- | resources/configuration.txt | 18 | ||||
-rw-r--r-- | resources/consulhelp.txt | 89 | ||||
-rw-r--r-- | resources/logback.xml | 49 |
4 files changed, 297 insertions, 0 deletions
diff --git a/resources/cloudifyhelp.txt b/resources/cloudifyhelp.txt new file mode 100644 index 0000000..069e3dc --- /dev/null +++ b/resources/cloudifyhelp.txt @@ -0,0 +1,141 @@ +{ + "items": + [ + { + "Description":"Get the list of all the blueprints", + "request": + { + "endpoint":"/blueprints", + "method":"GET" + } + }, + { + "Description":"Get a specific blueprint", + "request": + { + "endpoint":"/blueprints?id=<blueprint_id>", + "method":"GET" + } + }, + { + "Description":"View a specific blueprint", + "request": + { + "endpoint":"/viewblueprints?id=<blueprint_id>", + "method":"GET" + } + }, + { + "Description":"Delete a blueprint", + "request": + { + "endpoint":"/blueprints/<blueprint_id>", + "method":"DELETE" + } + }, + { + "Description":"Upload a new blueprints", + "request": + { + "endpoint":"/blueprints", + "method":"POST", + "requestBodyType":"JSON", + "requestBody": + { + "blueprint_id":"<blueprint_id>", + "blueprint_filename":"<blueprint_filename>", + "zip_url":"<zip_url>" + } + + } + }, + { + "Description":"Get the list of all the deployments", + "request": + { + "endpoint":"/deployments", + "method":"GET" + } + }, + { + "Description":"Get a specific deployment", + "request": + { + "endpoint":"/deployments?id=<deployment_id>", + "method":"GET" + } + }, + { + "Description":"Delete a deployment", + "request": + { + "endpoint":"/deployments/<deployment_id>", + "method":"DELETE" + } + }, + { + "Description":"Create a new deployment", + "request": + { + "endpoint":"/deployments", + "method":"POST", + "requestBodyType":"JSON", + "requestBody": + { + "deployment_id":"<deployment_id>", + "blueprint_id":"<blueprint_id>", + "parameters":{ + "Description":"all the parameters that are required as input for deploying blueprint" + } + } + + } + }, + { + "Description":"Get the list of all executions for a deployment", + "request": + { + "endpoint":"/executions?deployment_id=<deployment-id>", + "method":"GET" + } + }, + { + "Description":"Get a specific execution for a specific deployment", + "request": + { + "endpoint":"/executions/<execution_id>?deployment_id=<deployment-id>", + "method":"GET" + } + }, + { + "Description":"Cancel an execution", + "request": + { + "endpoint":"/executions/<execution_id>?deployment_id=<deployment_id>&action=<cancel|force-cancel>", + "method":"DELETE" + } + }, + { + "Description":"Start an execution", + "request": + { + "endpoint":"/executions", + "method":"POST", + "requestBodyType":"JSON", + "requestBody": + { + "deployment_id":"<deployment_id>", + "workflow_name":"<workflow_name>", + "allow_custom_parameter":"<true|false>", + "force":"<true|false>", + "parameters":{ + "Description":"all the parameters that are required as input for starting an execution" + } + } + + } + } + + ] + +}
\ No newline at end of file diff --git a/resources/configuration.txt b/resources/configuration.txt new file mode 100644 index 0000000..f8b09a2 --- /dev/null +++ b/resources/configuration.txt @@ -0,0 +1,18 @@ +{ + "manager_ip": "", + "api_version": "v2.1", + "consul_ip": "1", + "consul_port": "8500", + "consul_api_version": "v1", + "mechid": "", + "pass": "", + "enableAuthetication": true, + "postgres_ip": "", + "postgres_port": "5432", + "postgres_db_name": "", + "postgres_db_user": "", + "postgres_db_passwd": "ecompcu", + "postgres_db_max_conn": "50", + "manager_username": "admin", + "manager_password": "" +}
\ No newline at end of file diff --git a/resources/consulhelp.txt b/resources/consulhelp.txt new file mode 100644 index 0000000..4333255 --- /dev/null +++ b/resources/consulhelp.txt @@ -0,0 +1,89 @@ +{ + "items": [ + { + "Description": "Get all the services", + "request": { + "endpoint": "/healthservices/services", + "method": "GET" + } + }, + { + "Description": "Get all the nodes", + "request": { + "endpoint": "/healthservices/nodes", + "method": "GET" + } + }, + { + "Description": "Get all the datacenters", + "request": { + "endpoint": "/healthservices/datacenters", + "method": "GET" + } + }, + { + "Description": "Get all the health checks for the service", + "request": { + "endpoint": "/healthservices/services/<service_name>", + "method": "GET" + } + }, + { + "Description": "Get all the health checks for the nodes", + "request": { + "endpoint": "/healthservices/nodes/<node_name>", + "method": "GET" + } + }, + { + "Description": "Register a new service", + "request": { + "endpoint": "/healthservices/register", + "method": "POST", + "requestBodyType": "JSON", + "requestBody": { + "services": [ + { + "id": "<service_id>", + "name": "<service_name>", + "tags": [ + + ], + "address": "<service_address>", + "port": "<service_port>", + "checks": [ + { + "endpoint": "<http url for status>", + "interval": "<frequency to check health> e.g. 10s|10m", + "description": "<human readable description of the check", + "name": "<name of the check>" + }, + { + "endpoint": "<http url for status>", + "interval": "<frequency to check health> e.g. 10s|10m", + "description": "<human readable description of the check", + "name": "<name of the check>" + }, + + ] + } + ] + } + } + }, + { + "Description": "Deregister a service", + "request": { + "endpoint": "/healthservices/register/<service_id>", + "method": "POST" + } + }, + { + "Description": "Get Historical Data for a service", + "request": { + "endpoint": "/healthservices/svchist/<service_id>?start=yyyy-MM-dd'T'HH:mm:ss.SSZ&end=yyyy-MM-dd'T'HH:mm:ss.SSZ", + "method": "GET" + } + } + ] +}
\ No newline at end of file diff --git a/resources/logback.xml b/resources/logback.xml new file mode 100644 index 0000000..459b935 --- /dev/null +++ b/resources/logback.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + =============LICENSE_START========================================================= + + ================================================================================= + Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + + ECOMP is a trademark and service mark of AT&T Intellectual Property. + --> + +<!DOCTYPE xml> +<configuration> +<property name="filePath" value="/home/attcloud/apilayer"></property> + <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [ %-5level ] %logger{36} - %msg%n</pattern> + </encoder> + </appender> + <appender name="FileLogger" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${filePath}/apihandler.log</file> + <encoder> + <pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [ %-5level ] %logger{36} - %msg%n</pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${filePath}/apihandler.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>100MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + </appender> + <root level="DEBUG"> + <appender-ref ref="Console"/> + <appender-ref ref="FileLogger"/> + </root> +</configuration> |