-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove cl graph lookup + add Instances get_resource_map() #301
Conversation
def get_associated_cl(self, instance: dict) -> dict: | ||
return self.query( | ||
QUERIES["get_cl_from_instance"].format(resource_id=instance["extendedLocation"]["name"]), first=True | ||
def _get_associated_cl(self, instance: dict) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this should be abstracted since the assets also need the custom location...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless you expect us to create an instance of this class for assets/other rpsaas services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by this ? The instance has reference to the custom location Id. What do you need from the custom location to create an asset ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the custom location id (for the extended location) + all the cluster + custom location checks for asset/endpoint creation...
Eliminate usage of resource graph for fetching custom location associated with instance.
Provide useful public method on
Instances
,get_resource_map
.Example: