Skip to content

solarwinds-information-service: undefined: assets_all #35

@PedroTheIntern

Description

@PedroTheIntern

In solarwinds-information-service/custom-integration-swis.star it appears that assets_all is used without being defined in get_assets().

I'm inclined to define it as:
assets_all = []
but I'm not sure that is the best way.

I also thought about:

    data = json_decode(response.body)
    data_type = type(data)
    if data_type == 'dict':
        assets = data.get('results', [])
    elif data_type == 'list':
        assets = data
    else:
        print('unsupported response format from SWIS')
        return []

    return assets

But it much be much easier than I am making it.

Tagging @tdiderich as I think this is their code.

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