From 67e7ccb7ada320e89c4ad4294ae1367b9c8b2c16 Mon Sep 17 00:00:00 2001 From: denisa-dan Date: Thu, 2 Mar 2017 11:55:21 +0200 Subject: [PATCH] renamed directories and other small fixes --- .../examples}/yoda/contains.sl | 6 +++--- .../examples}/yoda/generate_random_quote.sl | 13 ++++++++----- .../examples}/yoda/print_image.sl | 13 ++++++++----- .../examples}/yoda/quote_check.sl | 19 ++++++++++--------- .../examples}/yoda/samples.prop.sl | 6 +++--- .../examples}/yoda/yoda_ascii_image.txt | 0 .../examples}/yoda/yoda_quotes.txt | 0 7 files changed, 32 insertions(+), 25 deletions(-) rename content/io/cloudslang/{samples => base/examples}/yoda/contains.sl (78%) rename content/io/cloudslang/{samples => base/examples}/yoda/generate_random_quote.sl (85%) rename content/io/cloudslang/{samples => base/examples}/yoda/print_image.sl (77%) rename content/io/cloudslang/{samples => base/examples}/yoda/quote_check.sl (81%) rename content/io/cloudslang/{samples => base/examples}/yoda/samples.prop.sl (76%) rename resources/{samples => base/examples}/yoda/yoda_ascii_image.txt (100%) rename resources/{samples => base/examples}/yoda/yoda_quotes.txt (100%) diff --git a/content/io/cloudslang/samples/yoda/contains.sl b/content/io/cloudslang/base/examples/yoda/contains.sl similarity index 78% rename from content/io/cloudslang/samples/yoda/contains.sl rename to content/io/cloudslang/base/examples/yoda/contains.sl index 702dcd534a..0e3c69983a 100644 --- a/content/io/cloudslang/samples/yoda/contains.sl +++ b/content/io/cloudslang/base/examples/yoda/contains.sl @@ -7,18 +7,18 @@ # ######################################################################################################################## #!! -#! @description: Check the state of a System Property file +#! @description: Decision that checks the state of a System Property file. #! #! @result CONTAINS: System Property is set at default value. #! @result DOES_NOT_CONTAIN: System Property is not set at default value. #!!# ######################################################################################################################## -namespace: io.cloudslang.samples.yoda +namespace: io.cloudslang.base.examples.yoda decision: name: contains results: - - CONTAINS: ${get_sp('io.cloudslang.samples.properties.default_quote', 'false') == 'true'} + - CONTAINS: ${get_sp('io.cloudslang.base.examples.properties.default_quote', 'false') == 'true'} - DOES_NOT_CONTAIN diff --git a/content/io/cloudslang/samples/yoda/generate_random_quote.sl b/content/io/cloudslang/base/examples/yoda/generate_random_quote.sl similarity index 85% rename from content/io/cloudslang/samples/yoda/generate_random_quote.sl rename to content/io/cloudslang/base/examples/yoda/generate_random_quote.sl index 51fc0a33a6..807ebf2667 100644 --- a/content/io/cloudslang/samples/yoda/generate_random_quote.sl +++ b/content/io/cloudslang/base/examples/yoda/generate_random_quote.sl @@ -6,16 +6,16 @@ # http://www.apache.org/licenses/LICENSE-2.0 ######################################################################################################################## #!! -#! @description: Based on a random number generator display a quote from Yoda +#! @description: The flow displays a Yoda quote based on a random number generator. #! -#! @input file_path: The path for the file that contains the quotes +#! @input file_path: The path for the file that contains the quotes. #! -#! @result SUCCESS: Flow completed successfully. +#! @result SUCCESS: The quote was displayed successfully. #! @result FAILURE: Failure occurred during execution. #!!# ######################################################################################################################## -namespace: io.cloudslang.samples.yoda +namespace: io.cloudslang.base.examples.yoda imports: math: io.cloudslang.base.math @@ -55,4 +55,7 @@ flow: base.print_text: - text: ${str(read_text.split(';')[int(random_number)])} navigate: - - SUCCESS: SUCCESS \ No newline at end of file + - SUCCESS: SUCCESS + results: + - SUCCESS + - FAILURE \ No newline at end of file diff --git a/content/io/cloudslang/samples/yoda/print_image.sl b/content/io/cloudslang/base/examples/yoda/print_image.sl similarity index 77% rename from content/io/cloudslang/samples/yoda/print_image.sl rename to content/io/cloudslang/base/examples/yoda/print_image.sl index 6b806e37d2..ad1bb25015 100644 --- a/content/io/cloudslang/samples/yoda/print_image.sl +++ b/content/io/cloudslang/base/examples/yoda/print_image.sl @@ -7,16 +7,16 @@ # ######################################################################################################################## #!! -#! @description: Read an image from a file and print it. +#! @description: The flow reads an image of Yoda from a file and prints it to the screen. #! -#! @input file_path: The path of the image +#! @input file_path: The path of the file containing the image. #! -#! @result SUCCESS: Flow completed successfully. +#! @result SUCCESS: The image was displayed successfully. #! @result FAILURE: Failure occurred during execution. #!!# ######################################################################################################################## -namespace: io.cloudslang.samples.yoda +namespace: io.cloudslang.base.examples.yoda imports: base: io.cloudslang.base.print @@ -44,4 +44,7 @@ flow: base.print_text: - text: ${read_text} navigate: - - SUCCESS: SUCCESS \ No newline at end of file + - SUCCESS: SUCCESS + results: + - SUCCESS + - FAILURE \ No newline at end of file diff --git a/content/io/cloudslang/samples/yoda/quote_check.sl b/content/io/cloudslang/base/examples/yoda/quote_check.sl similarity index 81% rename from content/io/cloudslang/samples/yoda/quote_check.sl rename to content/io/cloudslang/base/examples/yoda/quote_check.sl index dace5d7cfa..d059d66420 100644 --- a/content/io/cloudslang/samples/yoda/quote_check.sl +++ b/content/io/cloudslang/base/examples/yoda/quote_check.sl @@ -5,25 +5,26 @@ # The Apache License is available at # http://www.apache.org/licenses/LICENSE-2.0 # -#########################################################################################################################!! -#! @description: Based on a System Property file +######################################################################################################################## +#!! +#! @description: The flow is based on a System Property file #! If it is set on true it displays the default quote, otherwise generates a random quote. #! -#! @input default_quote : quote with a default value -#! @input file_path: The path for the file that contains the quotes +#! @input default_quote : quote with a default value. +#! @input file_path: The path for the file that contains the quotes. #! #! @result SUCCESS: Flow completed successfully. #! @result FAILURE: Failure occurred during execution. -#!! +#!!# ######################################################################################################################## -namespace: io.cloudslang.samples.yoda +namespace: io.cloudslang.base.examples.yoda imports: base: io.cloudslang.base.print fs: io.cloudslang.base.filesystem math: io.cloudslang.base.math - quoteGenerator: io.cloudslang.samples.yoda + quote_generator: io.cloudslang.base.examples.yoda flow: name: quote_check @@ -37,14 +38,14 @@ flow: workflow: - print_quote: do: - quoteGenerator.contains: [] + quote_generator.contains: [] navigate: - CONTAINS: print_default_quote - DOES_NOT_CONTAIN: print_random_quote - print_random_quote: do: - quoteGenerator.generate_random_quote: + quote_generator.generate_random_quote: - file_path navigate: - SUCCESS: SUCCESS diff --git a/content/io/cloudslang/samples/yoda/samples.prop.sl b/content/io/cloudslang/base/examples/yoda/samples.prop.sl similarity index 76% rename from content/io/cloudslang/samples/yoda/samples.prop.sl rename to content/io/cloudslang/base/examples/yoda/samples.prop.sl index 03e8c6a65f..b386f9b940 100644 --- a/content/io/cloudslang/samples/yoda/samples.prop.sl +++ b/content/io/cloudslang/base/examples/yoda/samples.prop.sl @@ -6,13 +6,13 @@ # http://www.apache.org/licenses/LICENSE-2.0 # ######################################################################################################################## -# System property file for samples.yoda operations. +# System property file for base.examples.yoda operations. # -# io.cloudslang.samples.properties.default_quote: value of default quote +# io.cloudslang.base.examples.properties.default_quote: value of default quote # ######################################################################################################################## -namespace: io.cloudslang.samples.properties +namespace: io.cloudslang.base.examples.properties properties: - default_quote: 'true' diff --git a/resources/samples/yoda/yoda_ascii_image.txt b/resources/base/examples/yoda/yoda_ascii_image.txt similarity index 100% rename from resources/samples/yoda/yoda_ascii_image.txt rename to resources/base/examples/yoda/yoda_ascii_image.txt diff --git a/resources/samples/yoda/yoda_quotes.txt b/resources/base/examples/yoda/yoda_quotes.txt similarity index 100% rename from resources/samples/yoda/yoda_quotes.txt rename to resources/base/examples/yoda/yoda_quotes.txt