Skip to content
This repository has been 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 opened this issue Dec 26, 2023 · 0 comments
Open

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

lior91 opened this issue Dec 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@lior91
Copy link

lior91 commented Dec 26, 2023

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

@lior91 lior91 added the bug Something isn't working label Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant