Skip to content

sppvmbackupinfo.py script failing #10

@svaroni

Description

@svaroni

When trying to get backup info from a vm, it's failing with the following error:

File "sppvmbackupinfo.py", line 50, in get_vm_version_info
urlpath = vm['config']['hypervisorKey'] + "/vm/" + vm['id'] + "/version?from=hlo"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Most likely the URI may have changed from when this script was created. I was able to workaround locally with the following change:

From:

    urlpath = vm['config']['hypervisorKey'] + "/vm/" + vm['id'] + "/version?from=hlo"
    versions = client.SppAPI(session, 'corehv').get(path=urlpath)

To:

    urlpath = vm['hypervisorKey'] + "/vm/" + vm['id'] + "/version?from=hlo"
    versions = client.SppAPI(session, 'corehv').get(path=urlpath)
    versions = versions['versions']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions