Skip to content

ListInstances of of openstack provider example returns invalid json array  #74

@MoritzKeppler

Description

@MoritzKeppler

ListInstances in https://github.com/cloudbase/garm/blob/main/contrib/providers.d/openstack/garm-external-provider returns a sequence of json objects but not a json array. Guess we need to encapsulate the whole jq string in '[...]', right?

echo ${INSTANCES} | jq -r '[
        .[] | .Properties * {
            provider_id: .ID,
            name: .Name,
            status: {"ACTIVE": "running", "SHUTOFF": "stopped", "BUILD": "pending_create", "ERROR": "error", "DELETING": "pending_delete"}[.Status]
        }]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions