Skip to content
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

Feature/v12 #1000

Merged
merged 31 commits into from
Jan 11, 2024
Merged

Feature/v12 #1000

merged 31 commits into from
Jan 11, 2024

Conversation

MariusWirtz
Copy link
Collaborator

@MariusWirtz MariusWirtz commented Dec 1, 2023

v12 feature branch based on https://github.com/rclapp/TM1py/tree/tm1-v12-ga-release-testing
Adapted to work with TM1 v12 in IBM Cloud (PaaS).

from TM1py import TM1Service

with TM1Service(
        address="us-east-2.aws.planninganalytics.ibm.com",
        api_key="AB4VfG7T8wPM-912uFKeYG5PGh0XbS80MVBAt7SEG6xn",
        iam_url="https://iam.cloud.ibm.com/identity/token",
        tenant="YA9A2T8BS2ZU",
        database="CWRecordsMDX") as tm1:

    print(tm1.dimensions.get_all_names())

@MariusWirtz
Copy link
Collaborator Author

@rclapp, @janus-t, @Wuzardor,
This could be a good base for further collaboration.

This Pull Request contains all commits from Ryan's branch but is rebased on the current master and contains one additional commit to adapt the branch for PAaaS: 608cdca

Above is an example of how you can use the branch with PAaaS in the IBM Cloud.

@rclapp
I am still trying to figure out the new terminology. Possibly the tenant and instance are actually the same thing?

I limited my changes to the RestService for now, but I might have accidentally broken the authentication mode you implemented for local v12. Could you please verify if it still works? I haven't arranged my access to local v12 yet.

I introduced an enum in the RestService to separate the different authentication modes more clearly.
There might be more synergies between the two authentication modes that we implemented.
I called mine IBM_CLOUD_API_KEY and yours CP4D. I am not sure about those names TBH.

Now I will do more testing and try to make things pretty and name things more appropriately.

@rclapp
Copy link
Collaborator

rclapp commented Dec 1, 2023 via email

@Wuzardor
Copy link

Wuzardor commented Dec 1, 2023

Hi everyone,

Marius, thank you for your work.

I don't know how to test the code you've developed in the branch 608cdca to check the TM1py connection for PAaaS.
I've been reading what you changed in the RestService class and the AuthenticationMode class. Given my Python skill level, I couldn't have done that.

Regarding the question about the tenant, here is a brief explanation:

In the context of IBM services, "tenant" typically refers to a specific instance or client of a cloud service. Each client is considered a distinct "tenant" with isolated resources and configurations. When connecting to an IBM service, the URL may include a reference to the tenant, directing authentication and authorization to the specific instance you want to access. For example, in the URL "https://service.ibm.com/tenant1234/resource," "tenant1234" is the tenant identifier. The service uses this information to ensure access to the appropriate resources within that specific tenant.
Here you'll find information about the API for PAaaS :

@MariusWirtz
Copy link
Collaborator Author

MariusWirtz commented Dec 3, 2023

@Wuzardor,

Thanks for the background on the tenant vs instance concepts.

You can upgrade your local TM1py to this branch with the pip statement below.

pip uninstall tm1py
pip install https://github.com/cubewise-code/tm1py/archive/refs/heads/feature/v12.zip

Then you can test it easily if you have access to a v12 instance.

from TM1py import TM1Service

with TM1Service(
        address="us-east-2.aws.planninganalytics.ibm.com",
        api_key="AB4VfG7T8wPM-912uFKeYG5PGh0XbS80MVBAt7SEG6xn",
        iam_url="https://iam.cloud.ibm.com/identity/token",
        tenant="YA9A2T8BS2ZU",
        database="CWRecordsMDX") as tm1:

    print(tm1.dimensions.get_all_names())

rclapp and others added 25 commits January 8, 2024 13:06
* Moved api path to base url to continue to support v11

* Refactored all services to continue v11 support and expand support to v12 using the base_url property.

* Update config.ini

Fixed test fixture config

* Corrected test_get_threads to include api/v1 in the path

* Support for v12 Auth with backwards compatibility.

* Updates to cell service to support v12 using blobs. Updates include tests, new utils for skipping invalid tests, and updates to the FileService.py

* Updates to services and tests to support v12

* Updates to services and tests to support v12

* Small change to CubeService_test.py to use a real rule statement in the get all names test. Test used to use comments which seem unreliable across versions.

* Updates to the ProcessService and HierarchyService and related tests.

* Removed test that requires control process, not all models have control processes.

* New functions request the server metadata and update system logger levels

* Updates to process tests

* Remove ODATA tags that are not needed

* Updates to the application service to support v12. Updated tests to resolve dependency issues with chores and processes.

* New manage service that allows you to control the PAe control plane

* Remove support for Impersonation and ErrorLogs entity

* Manage Service Updates

* Manage Service Updates and small fixes to security tests

* Simplification of the auth and root creation methods
prototype return_async_id feature
@MariusWirtz MariusWirtz marked this pull request as ready for review January 8, 2024 12:08
@MariusWirtz
Copy link
Collaborator Author

rebased on current master and ready to be merged IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants