Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow io.cloudslang.vmware.vcenter.virtual_machines.clone_virtual_machine cannot create VMs in sub-folders #1027

Open
pe-pan opened this issue Feb 4, 2018 · 0 comments

Comments

@pe-pan
Copy link
Contributor

pe-pan commented Feb 4, 2018

I've got a vCenter instance with following folder structure:

/capa1                               - vCenter instance
  /CAPA1 Datacenter                  - datacenter
    /Students                        - root folder
      /Petr                          - sub-folder

When I execute the following code, the operation succeeds and the VM is created in Students folder.

namespace: io.cloudslang.demo
imports:
  base: io.cloudslang.base
  vm: io.cloudslang.vmware.vcenter.virtual_machines
flow:
  name: deploy_tomcat
  inputs:
    - hostname
    - username
    - password
    - image: "Ubuntu"
    - folder: "Students"
  workflow:
    - uuid_generator:
        do:
          base.utils.uuid_generator:
        publish:
          - uuid: '${new_uuid}'
        navigate:
          - SUCCESS: trim
    - trim:
          do:
            base.strings.substring:
              - origin_string: '${"petr-"+uuid}'
              - end_index: '13'
          publish:
            - id: '${new_string}'
          navigate:
            - FAILURE: FAILURE
            - SUCCESS: clone_vm
    - clone_vm:
        do:
          vm.clone_virtual_machine:
            - host: '${hostname}'
            - hostname: 'trnesxi3.eswdc.net'
            - clone_host: 'trnesxi3.eswdc.net'
            - clone_data_store: 'datastore2'
            - username: '${username}'
            - password: '${password}'
            - data_center_name: 'CAPA1 Datacenter'
            - is_template: 'false'
            - virtual_machine_name: '${image}'
            - clone_name: '${id}'
            - folder_name: '${folder}'
        navigate:
          - FAILURE: FAILURE
          - SUCCESS: SUCCESS
  results:
      - FAILURE
      - SUCCESS

When I change the folder parameter into "Students/Petr", the flow fails on this error: error_message=java.lang.RuntimeException: Cannot find the specified folder.

The same happens when I set the folder parameter into "Students\Petr".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant