Skip to content

Commit

Permalink
Merge branch 'master' into update_cloudslang
Browse files Browse the repository at this point in the history
  • Loading branch information
tethryus authored Jul 16, 2018
2 parents 301bba0 + 1d8b38b commit 91bb914
Show file tree
Hide file tree
Showing 46 changed files with 884 additions and 485 deletions.
12 changes: 2 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ env:
global:
- JAVA_OPTS="-XX:MaxPermSize=512m"

matrix:
- SUITE=containers
- SUITE=images
- SUITE=docker-misc,docker_examples
- SUITE=git,remote-copy
- SUITE=http,rest,zip

before_install:
- docker run -d -e SWAGGER_HOST=http://localhost -e SWAGGER_BASE_PATH=/v2 -p 3000:8080 swaggerapi/petstore;

Expand All @@ -40,11 +33,10 @@ script:
- docker info
- docker version
- df -kh
- wget https://github.com/CloudSlang/cloud-slang/releases/download/cloudslang-1.0.22/cslang-builder.zip
- wget https://github.com/CloudSlang/cloud-slang/releases/download/cloudslang-1.0.16/cslang-builder.zip
- unzip -q cslang-builder.zip
- chmod +x cslang-builder/bin/cslang-builder
- ./cslang-builder/bin/cslang-builder -ts ${SUITE},\!default -cov -des -cs

# cat prints only part of the file for some reason so we print ourselves
after_failure: while read line; do printf "%s\n" "$line"; done < ./cslang-builder/logs/builder.log

after_failure: while read line; do printf "%s\n" "$line"; done < ./cslang-builder/logs/builder.log
237 changes: 122 additions & 115 deletions content/io/cloudslang/amazon/aws/cloudformation/create_stack.sl
Original file line number Diff line number Diff line change
@@ -1,116 +1,123 @@
# (c) Copyright 2018 EntIT Software LLC, a Micro Focus company, L.P.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License v2.0 which accompany this distribution.
#
# The Apache License is available 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.
#
########################################################################################################################
#!!
#! @description: This operation launches an AWS Cloud Formation stack.
#!
#! @input identity: ID of the secret access key associated with your Amazon AWS account.
#! @input credential: Secret access key associated with your Amazon AWS account.
#! @input proxy_host: Proxy server used to access the provider services.
#! Optional
#! @input connect_timeout: Connect timeout in milliseconds.
#! Default: '10000'
#! Optional
#! @input execution_timeout: Execution timeout in milliseconds.
#! Default: '600000'
#! Optional
#! @input proxy_port: Proxy server port used to access the provider services.
#! Default: '8080'
#! Optional
#! @input proxy_username: Proxy server user name.
#! Optional
#! @input proxy_password: Proxy server password associated with the proxy_username input value.
#! Optional
#! @input region: AWS region where the stack will be created.
#! @input stack_name: AWS stack name to be created.
#! @input template_body: AWS template body.
#!
#! @output return_result: Contains the instance details in case of success, error message otherwise.
#! @output return_code: "0" if operation was successfully executed, "-1" otherwise.
#! @output exception: Exception if there was an error when executing, empty otherwise.
#!
#! @result SUCCESS: The server (instance) was successfully deployed.
#! @result FAILURE: There was an error while trying to deploy the instance.
#!!#
########################################################################################################################
namespace: io.cloudslang.amazon.aws.cloudformation

operation:
name: create_stack
inputs:
- identity
- credential:
sensitive: true
- region
- stack_name
- stackName:
default: ${get("stack_name", "")}
private: true
- template_body
- templateBody:
default: ${get("template_body", "")}
private: true
- connect_timeout:
required: false
default: "10000"
- connectTimeout:
default: ${get("connect_timeout", "")}
private: true
- execution_timeout:
required: false
default: "600000"
- executionTimeout:
default: ${get("execution_timeout", "")}
private: true
- proxy_host:
required: false
- proxyHost:
default: ${get("proxy_host", "")}
required: false
private: true
- proxy_port:
default: '8080'
required: false
- proxyPort:
default: ${get("proxy_port", "")}
required: false
private: true
- proxy_username:
required: false
- proxyUsername:
default: ${get("proxy_username", "")}
required: false
private: true
- proxy_password:
required: false
sensitive: true
- proxyPassword:
default: ${get("proxy_password", "")}
required: false
private: true
sensitive: true

java_action:
gav: 'io.cloudslang.content:cs-amazon:1.0.15'
class_name: io.cloudslang.content.amazon.actions.cloudformation.CreateStackAction
method_name: execute

outputs:
- return_result: ${get("returnResult", "")}
- return_code: get("returnCode", "")
- exception: ${get("exception", "")}

results:
- SUCCESS: ${returnCode == "0"}
# (c) Copyright 2018 EntIT Software LLC, a Micro Focus company, L.P.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License v2.0 which accompany this distribution.
#
# The Apache License is available 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.
#
########################################################################################################################
#!!
#! @description: This operation launches an AWS Cloud Formation stack.
#!
#! @input identity: ID of the secret access key associated with your Amazon AWS account.
#! @input credential: Secret access key associated with your Amazon AWS account.
#! @input proxy_host: Proxy server used to access the provider services.
#! Optional
#! @input connect_timeout: Connect timeout in milliseconds.
#! Default: '10000'
#! Optional
#! @input execution_timeout: Execution timeout in milliseconds.
#! Default: '600000'
#! Optional
#! @input proxy_port: Proxy server port used to access the provider services.
#! Default: '8080'
#! Optional
#! @input proxy_username: Proxy server user name.
#! Optional
#! @input proxy_password: Proxy server password associated with the proxy_username input value.
#! Optional
#! @input region: AWS region where the stack will be created.
#! @input stack_name: AWS stack name to be created.
#! @input template_body: AWS template body.
#! @input parameters: AWS template parameters in key:value format. Every key:value pair should be on its own line.
#! @input capabilities: A list of values that you must specify before AWS CloudFormation can create certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. or those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
#! Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM
#!
#! @output return_result: Contains the instance details in case of success, error message otherwise.
#! @output return_code: "0" if operation was successfully executed, "-1" otherwise.
#! @output exception: Exception if there was an error when executing, empty otherwise.
#!
#! @result SUCCESS: The stack was successfully created
#! @result FAILURE: There was an error while trying to create the stack
#!!#
########################################################################################################################
namespace: io.cloudslang.amazon.aws.cloudformation

operation:
name: create_stack
inputs:
- identity
- credential:
sensitive: true
- region
- stack_name
- stackName:
default: ${get("stack_name", "")}
private: true
- template_body
- templateBody:
default: ${get("template_body", "")}
private: true
- parameters:
required: false
- capabilities:
required: false
- connect_timeout:
required: false
default: "10000"
- connectTimeout:
default: ${get("connect_timeout", "")}
private: true
- execution_timeout:
required: false
default: "600000"
- executionTimeout:
default: ${get("execution_timeout", "")}
private: true
- proxy_host:
required: false
- proxyHost:
default: ${get("proxy_host", "")}
required: false
private: true
- proxy_port:
default: '8080'
required: false
- proxyPort:
default: ${get("proxy_port", "")}
required: false
private: true
- proxy_username:
required: false
- proxyUsername:
default: ${get("proxy_username", "")}
required: false
private: true
- proxy_password:
required: false
sensitive: true
- proxyPassword:
default: ${get("proxy_password", "")}
required: false
private: true
sensitive: true

java_action:
gav: 'io.cloudslang.content:cs-amazon:1.0.18'
class_name: io.cloudslang.content.amazon.actions.cloudformation.CreateStackAction
method_name: execute

outputs:
- return_result: ${get("returnResult", "")}
- return_code: ${get("returnCode", "")}
- exception: ${get("exception", "")}

results:
- SUCCESS: ${returnCode == "0"}
- FAILURE
Loading

0 comments on commit 91bb914

Please sign in to comment.