Skip to content

braincube.get_name() is broken #104

@mathisc

Description

@mathisc

Describe the bug
braincube.get_name() is broken (at least on my local stack and internal preprod)

To Reproduce

from braincube_connector import braincube, client

client.get_instance(config_dict={"api_key": api_key, "domain": domain, "verify": False})
bc = braincube.get_braincube(braincube_name)
print(bc.get_name())

I am getting the following error :

python3.10/site-packages/braincube_connector/bases/base_entity.py", line 216, in get_name
    return self._metadata[self.get_parameter_key("name")]
KeyError: 'name'

Likely because name is nested under product (and not under braincube directly) :
{'product': {... 'name': 'testBraincube'}}

Expected behavior
I expect the name of the braincube instance to show up

Versions:
braincube-connector==2.6.0

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