Multiple API task requests

Hi,

I am having an issue with updating IP addresses for multiple devices using the API.

I have a script that communicates with the GenieACS to update IP addresses, subnet masks and gateway. It returns the status code of 200. When I log onto the GenieACS UI the details for those device IDs are correct. When I summon the first device it works, but when I summon the second device it shows as offline.

When I log onto the second device via LAN, I see that only the gateway updated and not the IP address or the subnet mask. which causes it not to break out to the internet.

I have tried refreshing parameters and waiting for status code 200 instead of 202 and I have also tried setting a timer between each device, but I always come into the same issue.

Please include the full source code for what you are trying to accomplish.

    - name:  Update IP for each device
      ansible.builtin.uri:
        url: "{{ acs_url }}/{{ acs_collection }}/{{ item[0] | urlencode }}/tasks?connection_request"
        method: POST
        user: "{{ acs_username }}"
        password: "{{ acs_password }}"
        headers:
          Content-Type: application/json
        body_format: json
        body:
          name: "setParameterValues"
          parameterValues: [
            ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress", "{{ item[1] }}", "xsd:string"],
            ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.SubnetMask", "{{ acs_subnet }}", "xsd:string"],
            ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.DefaultGateway", "{{ acs_gateway }}", "xsd:string"]
          ]
        status_code: 200
      loop: "{{ device_ids | zip(acs_ips) | list }}"
      loop_control:
        loop_var: item

Yeah sorry, I’m not helping you debug your ansible scripts. If you can recreate the issue using curl I’ll be happy to help.

Here I have the same issue using curl.

curl -X POST \
  -H "Content-Type: application/json" \
  "https://acs.vanilla.capetown:7557/devices/80AFCA-WR1300%2520V3%252E0-WR1300231006090/tasks?connection_request" \
  -d '{
        "name": "setParameterValues",
        "parameterValues": [
          ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress", "10.2.21.35", "xsd:string"],
          ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.SubnetMask", "255.255.255.248", "xsd:string"],
          ["InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.DefaultGateway", "10.2.21.33", "xsd:string"]
        ]
      }'

What is in /var/log/genieacs/genieacs-cwmp-access.log for the CPEs in question? Is the CPE responding on its connection request URL? Remember that TR-69 is client driven. The CWMP client on the CPE needs to inform to the ACS before it can receive any instructions.

I get statusCode 204 back from the client