cloudera-labs / cdpy

A Simple Pythonic Client wrapper for Cloudera CDP CLI, designed for use with the Ansible framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base 7.1.5 / Private Cloud 1.1 / OpenShift 4.5: sdk.gather_clusters does not work as it seems to expect a string starting with crn:cdp:environments instead of crn:altus:environments

marcredhat opened this issue · comments

Env: Base 7.1.5 / Private Cloud 1.1 / OpenShift 4.5

Test program: https://github.com/marcredhat/cdpy/blob/main/testprivate1.py

sdk.describe_all_environments()) and sdk.summarize_environment("marccdp"))
work fine and display the following CDP environment crn:

#RESULT:
#[{'environmentName': 'marccdp', 'crn': 'crn:altus:environments:us-west-1:27c485f2-d664-4a62-911c-8454d5ea311a:environment:marccdp/5b56f5d8-6089-43f6-96bb-fa67e9d3ba44', 'status': 'AVAILABLE', 'cloudPlatform': 'OPENSHIFT'}]

Issue:
sdk.gather_clusters("crn:altus:environments:us-west-1:27c485f2-d664-4a62-911c-8454d5ea311a:environment:marccdp/5b56f5d8-6089-43f6-96bb-fa67e9d3ba44"))

does not work as it seems to expect a string starting with crn:cdp:environments instead of crn:altus:environments

#RESULT (NOK)
#cdpy.common.CdpError: CdpError('Supplied env_crn crn:altus:environments:us-west-1:27c485f2-d664-4a62-911c-8454d5ea311a:environment:marccdp/5b56f5d8-6089-43f6-96bb-fa67e9d3ba44 is not a valid CDP Environment crn',)
#seems related to the fact that https://github.com/cloudera-labs/cdpy/blob/main/src/cdpy/dw.py expects
#a string starting with
#crn:cdp:environments instead of
#crn:altus:environments