Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Status code: 400/None when attempting any kind of operation #227

Open
@lior91

Description

@lior91

Describe the bug

Hello,
I'm trying out this module in order to automate EdgeGw operations in the future. From what I can see in the monitoring section, there are a few successful login/authorize attempts matching the timestamp of the playbook runs. Yet, no matter what service/operation I request, I get:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Status code: 400/None, None (request id: 954be739-a291-48da-8270-d945d707eb54)"}

Reproduction steps

  1. pip3 install pyvcloud
  2. git clone https://github.com/vmware/ansible-module-vcloud-director
  3. My playbook looks like that:
- name: vCloudDirectorAnsible
  hosts: localhost
  tasks:
    - name: Do Something
      vcd_gateway_services:
        host: "{{ VCD_URL }}" # Same as "Site"
        user: "{{ VCD_USER }}"
        password: "{{ VCD_PASSWORD }}" # Same user-credentials as I login into the GUI
        org: "{{ VCD_ORG }}" Same as "Organisation"
        vdc: "{{ VCD_ORG_VDC }}" Same as "Datacenter"
        api_version: "34.0" # Also tried 33.0, which is also supported, same result
        verify_ssl_certs: false
        gateway: "edge-gateway"
        service: "firewall"
        operation: "list"
  1. ansible-playbook -i localhost test.yml

Note that I also tried to create a new NAT-rule using this example, But the result is the same.

Expected behavior

A list of FW-rules, or a new NAT-rule when using the following pattern:

- name: create vCD edge gateway nat rule
       vcd_gateway_services:
         vdc: "{{ VCD_ORG_VDC }}"
         gateway: "edge-gateway"
         service: "nat_rule"
         service_params:
            - action: "snat"
              original_address: "{{ internal_ip }}"
              translated_address: "{{ external_ip }}"
         state: "present"

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions