Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-101717

Fix legacy Create Replication Task API

    XMLWordPrintable

    Details

    • Attempts to pass:
      1
    • Testing System:
      bhyve
    • QA Status:
      Test Passes TrueNAS
    • Acceptance Criteria:
      Refer to description.

      Description

      Created by request from dlavigne

      Forum Post: https://www.ixsystems.com/community/threads/missing-error-checking-for-create-replication-task-api-request.76265/ 


      Using a python script to create a replication task with the API (POST /api/v1.0/storage/replication/). The process will error out with the below message if parameter "remote_http_port" is not included in the request. This error is different from other required parameters. Other required parameters will return a message when the value is missing. Ex: "repl_remote_hostname": ["This field is required."]

      File \"./freenasUI/storage/forms.py\", line 2461, in middleware_clean
      remote_http_port = int(data.pop('remote_http_port', 80))

      ValueError: invalid literal for int() with base 10: ''


      This is the package I'm sending to the API.

      "repl_begin": "00:00:00",
      "repl_compression": "off",
      "repl_enabled": false,
      "repl_end": "23:59:59",
      "repl_filesystem": "pond/backup",
      "repl_followdelete": true,
      "repl_limit": 0,
      "repl_remote_cipher": "disabled",
      "repl_remote_dedicateduser": null,
      "repl_remote_dedicateduser_enabled": false,
      "repl_remote_hostkey": "localhost KEY",
      "repl_remote_hostname": "localhost",
      "repl_remote_port": 22,
      "repl_userepl": false,
      "repl_zfs": "ExtBackup_01"

      Also the API documentation says the "repl_remote_http_port" is a string.

      Build: FreeNAS-11.2-U4 (Build Date: May 7, 2019 0:46)

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                themylogin Vladimir Vinogradenko
                Reporter:
                irTwit Ir Twit
                QE Engineer:
                Eric Turgeon
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel