brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m4rkmckenna <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #210: Adds the ability for you to fetch all chi...
Date Tue, 21 Jun 2016 11:08:42 GMT
GitHub user m4rkmckenna opened a pull request:

    https://github.com/apache/brooklyn-server/pull/210

    Adds the ability for you to fetch all children of an activity

    Example 
    GET http://localhost:8081/v1/activities/abc123/children/recurse
    
    ```
    {
        "sCxsLgvm": {
            "id": "sCxsLgvm",
            "displayName": "invoking start[locations] on 1 node",
            "description": "",
            "entityId": "z81e0jl9j4",
            "entityDisplayName": "simple-app",
            "tags": [
                "SUB-TASK",
                {
                    "type": "org.apache.brooklyn.core.test.entity.LocalManagementContextForTests"
                },
                {
                    "wrappingType": "contextEntity",
                    "entity": {
                        "type": "org.apache.brooklyn.api.entity.Entity",
                        "id": "z81e0jl9j4"
                    }
                }
            ],
            "submitTimeUtc": 1466502440778,
            "startTimeUtc": 1466502440778,
            "endTimeUtc": 1466502441114,
            "currentStatus": "Completed",
            "result": [
                null
            ],
            "isError": false,
            "isCancelled": false,
            "children": [
                {
                    "link": "/activities/WfYmdAuS",
                    "metadata": {
                        "id": "WfYmdAuS",
                        "taskName": "start",
                        "entityId": "cmfr998e06",
                        "entityDisplayName": "simple-ent"
                    }
                }
            ],
            "submittedByTask": {
                "link": "/activities/umIaqimp",
                "metadata": {
                    "id": "umIaqimp",
                    "taskName": "start",
                    "entityId": "z81e0jl9j4",
                    "entityDisplayName": "simple-app"
                }
            },
            "detailedStatus": "Completed after 336ms\n\nResult: [null]",
            "streams": {},
            "links": {
                "self": "/activities/sCxsLgvm",
                "children": "/activities/sCxsLgvm/children",
                "entity": "/applications/z81e0jl9j4/entities/z81e0jl9j4"
            }
        },
        "WfYmdAuS": {
            "id": "WfYmdAuS",
            "displayName": "start",
            "description": "Invoking effector start on simple-ent with parameters {locations=[LocalhostMachineProvisioningLocation{id=g1zmb43lie,
name=localhost}]}",
            "entityId": "cmfr998e06",
            "entityDisplayName": "simple-ent",
            "tags": [
                "EFFECTOR",
                "SUB-TASK",
                {
                    "wrappingType": "contextEntity",
                    "entity": {
                        "type": "org.apache.brooklyn.api.entity.Entity",
                        "id": "cmfr998e06"
                    }
                },
                {
                    "type": "org.apache.brooklyn.core.test.entity.LocalManagementContextForTests"
                },
                {
                    "wrappingType": "targetEntity",
                    "entity": {
                        "type": "org.apache.brooklyn.api.entity.Entity",
                        "id": "cmfr998e06"
                    }
                },
                {
                    "entityId": "cmfr998e06",
                    "effectorName": "start"
                }
            ],
            "submitTimeUtc": 1466502440778,
            "startTimeUtc": 1466502440778,
            "endTimeUtc": 1466502441114,
            "currentStatus": "Completed",
            "result": null,
            "isError": false,
            "isCancelled": false,
            "children": [
                {
                    "link": "/activities/X9MqBujF",
                    "metadata": {
                        "id": "X9MqBujF",
                        "taskName": "provisioning (localhost)",
                        "entityId": "cmfr998e06",
                        "entityDisplayName": "simple-ent"
                    }
                },
                {
                    "link": "/activities/ErGE1oPr",
                    "metadata": {
                        "id": "ErGE1oPr",
                        "taskName": "pre-start",
                        "entityId": "cmfr998e06",
                        "entityDisplayName": "simple-ent"
                    }
                },
                {
                    "link": "/activities/ud8TXRaU",
                    "metadata": {
                        "id": "ud8TXRaU",
                        "taskName": "start (processes)",
                        "entityId": "cmfr998e06",
                        "entityDisplayName": "simple-ent"
                    }
                },
                {
                    "link": "/activities/J1Kkj2xF",
                    "metadata": {
                        "id": "J1Kkj2xF",
                        "taskName": "post-start",
                        "entityId": "cmfr998e06",
                        "entityDisplayName": "simple-ent"
                    }
                }
            ],
            "submittedByTask": {
                "link": "/activities/sCxsLgvm",
                "metadata": {
                    "id": "sCxsLgvm",
                    "taskName": "invoking start[locations] on 1 node",
                    "entityId": "z81e0jl9j4",
                    "entityDisplayName": "simple-app"
                }
            },
            "detailedStatus": "Completed after 336ms\n\nNo return value (null)",
            "streams": {},
            "links": {
                "self": "/activities/WfYmdAuS",
                "children": "/activities/WfYmdAuS/children",
                "entity": "/applications/z81e0jl9j4/entities/cmfr998e06"
            }
        },
        "X9MqBujF": {
            "id": "X9MqBujF",
            "displayName": "provisioning (localhost)",
            "description": "",
            "entityId": "cmfr998e06",
            "entityDisplayName": "simple-ent",
            "tags": [
                "SUB-TASK",
                {
                    "wrappingType": "contextEntity",
                    "entity": {
                        "type": "org.apache.brooklyn.api.entity.Entity",
                        "id": "cmfr998e06"
                    }
                },
                {
                    "type": "org.apache.brooklyn.core.test.entity.LocalManagementContextForTests"
                }
            ],
            "submitTimeUtc": 1466502440782,
            "startTimeUtc": 1466502440782,
            "endTimeUtc": 1466502440799,
            "currentStatus": "Completed",
            "result": {
                "type": "org.apache.brooklyn.api.location.Location",
                "id": "fe4jz35nvm"
            },
            "isError": false,
            "isCancelled": false,
            "children": [],
            "submittedByTask": {
                "link": "/activities/WfYmdAuS",
                "metadata": {
                    "id": "WfYmdAuS",
                    "taskName": "start",
                    "entityId": "cmfr998e06",
                    "entityDisplayName": "simple-ent"
                }
            },
            "detailedStatus": "Completed after 17ms\n\nResult: SshMachineLocation[localhost:null@chimera.local/192.168.4.161:22(id=fe4jz35nvm)]",
            "streams": {},
            "links": {
                "self": "/activities/X9MqBujF",
                "children": "/activities/X9MqBujF/children",
                "entity": "/applications/z81e0jl9j4/entities/cmfr998e06"
            }
        },
    ########################
    # RESPONSE TRUNCATED #
    ########################
    }
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/m4rkmckenna/brooklyn-server feature/get-all-child-activities

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/210.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #210
    
----
commit ae7e2f5de2817de11a16caaacd00263b28498939
Author: Mark McKenna <m4rkmckenna@gmail.com>
Date:   2016-06-21T09:52:05Z

    Adds /activities/{id}/children/recurse endpoint for fetching all child tasks

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message