Skip to content
3 changes: 0 additions & 3 deletions content/io/cloudslang/amazon/aws/ec2/utils/get_unique_name.sl
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ flow:
- instance_tags_key: '${return_result}'
navigate:
- SUCCESS: add_value_tag
- FAILURE: set_failure_message_unknown_error

- add_value_tag:
do:
Expand All @@ -204,12 +203,10 @@ flow:
- delimiter: '${delimiter}'
- element: '${random_name}'
publish:
- return_code: '${return_code}'
- instance_tags_value: '${return_result}'
- return_result: 'Successfully generated a unique name!'
navigate:
- SUCCESS: SUCCESS
- FAILURE: set_failure_message_unknown_error

- is_list_empty:
do:
Expand Down
32 changes: 12 additions & 20 deletions content/io/cloudslang/base/lists/add_element.sl
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,26 @@
#! Example: '7'
#! @input delimiter: The list delimiter
#!
#! @output response: 'success' or 'failure'
#! @output return_result: The new list or an error message otherwise
#! @output return_code: 0 if success, -1 if failure
#!
#! @result SUCCESS: The new list was retrieved with success
#! @result FAILURE: Otherwise
#!!#
########################################################################################################################

namespace: io.cloudslang.base.lists

operation:
name: add_element

inputs:
- list
- element
- delimiter

java_action:
gav: 'io.cloudslang.content:cs-lists:0.0.7'
class_name: io.cloudslang.content.actions.ListAppenderAction
method_name: appendElement

- list:
required: false
- element:
required: false
- delimiter:
default: ','
required: false
python_action:
script: |
list = list+delimiter+element if list else element
outputs:
- return_result: ${returnResult}
- return_code: ${returnCode}

- return_result: ${list}
results:
- SUCCESS: ${returnCode == '0'}
- FAILURE
- SUCCESS
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,13 @@ flow:

- upload_init_config_file:
do:
remote.remote_secure_copy:
ssh.ssh_flow:
- host
- username: 'root'
- password: ${root_password}
- source_path
- destination_host: ${host}
- destination_path: '/etc/init.d/tomcat'
- destination_username: 'root'
- destination_password: ${root_password}
- destination_path: '/etc/init.d/tomcat/'
- command: ${'ln -s ' + source_path + '/* ' + destination_path}
publish:
- return_result
- return_code
Expand Down