RedHatCloudForms / cfme-cloud_services

Red Hat Cloud Services plugin for CloudForms
Apache License 2.0
5 stars 13 forks source link

Add ip address to context data #43

Closed mzazrivec closed 5 years ago

mzazrivec commented 5 years ago

This is to send back IP address of the appliance, where the actual payload is stored / saved.

Sample task result when sent over API:

{
    "href": "http://localhost:3000/api/tasks/350",
    "id": "350",
    "name": "Collect and package inventory",
    "state": "Finished",
    "status": "Ok",
    "message": "Task completed successfully",
    "userid": "admin",
    "created_on": "2019-08-22T13:50:05Z",
    "updated_on": "2019-08-22T13:50:07Z",
    "pct_complete": null,
    "context_data": {
        "payload_path": "/tmp/cfme_inventory-20190822-30550-1ufxu0p.tar.gz",
        "ip_address": "192.168.1.17"
    },
    "results": null,
    "miq_server_id": "3",
    "identifier": null,
    "started_on": "2019-08-22T13:50:06Z",
    "zone": null,
    "actions": [
        {
            "name": "delete",
            "method": "post",
            "href": "http://localhost:3000/api/tasks/350"
        },
        {
            "name": "delete",
            "method": "delete",
            "href": "http://localhost:3000/api/tasks/350"
        }
    ]
}

@agrare review please? Thank you.

miq-bot commented 5 years ago

Checked commit https://github.com/mzazrivec/cfme-cloud_services/commit/24be1a6248cba4696917af101ca1dd4b4eed1b7f with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 1 file checked, 0 offenses detected Everything looks fine. :+1:

agrare commented 5 years ago

https://bugzilla.redhat.com/show_bug.cgi?id=1744606

simaishi commented 5 years ago

Ivanchuk backport details:

$ git log -1
commit a9f9f526edffda74f75adf1451bc25154fbb95a4
Author: Adam Grare <agrare@redhat.com>
Date:   Thu Aug 22 10:03:05 2019 -0400

    Merge pull request #43 from mzazrivec/add_ip_address_to_context_data_of_the_bundle_task_results

    Add ip address to context data

    (cherry picked from commit d83e00ef5022772c61666fad7dfaf2dda04113ae)

    https://bugzilla.redhat.com/show_bug.cgi?id=1744606