|
59 | 59 |
|
60 | 60 | profile_id = None
|
61 | 61 | profile_etag = None
|
| 62 | +profile_identity_etag = None |
62 | 63 |
|
63 | 64 | claimRule_id = None
|
64 | 65 | claimRule_etag = None
|
@@ -469,7 +470,7 @@ def test_get_profile_example(self):
|
469 | 470 |
|
470 | 471 | response = iam_identity_service.get_profile(
|
471 | 472 | profile_id=profile_id,
|
472 |
| - include_history=True, |
| 473 | + include_activity=True, |
473 | 474 | )
|
474 | 475 |
|
475 | 476 | profile_etag = response.get_headers()['Etag']
|
@@ -663,9 +664,9 @@ def test_create_link_example(self):
|
663 | 664 | # begin-create_link
|
664 | 665 |
|
665 | 666 | CreateProfileLinkRequestLink = {}
|
666 |
| - CreateProfileLinkRequestLink[ |
667 |
| - 'crn' |
668 |
| - ] = 'crn:v1:staging:public:iam-identity::a/18e3020749ce4744b0b472466d61fdb4::computeresource:Fake-Compute-Resource' |
| 667 | + CreateProfileLinkRequestLink['crn'] = ( |
| 668 | + 'crn:v1:staging:public:iam-identity::a/' + account_id + '::computeresource:Fake-Compute-Resource' |
| 669 | + ) |
669 | 670 | CreateProfileLinkRequestLink['namespace'] = 'default'
|
670 | 671 | CreateProfileLinkRequestLink['name'] = 'nice name'
|
671 | 672 |
|
@@ -744,6 +745,112 @@ def test_delete_link_example(self):
|
744 | 745 | except ApiException as e:
|
745 | 746 | pytest.fail(str(e))
|
746 | 747 |
|
| 748 | + @needscredentials |
| 749 | + def test_get_profile_identities(self): |
| 750 | + """ |
| 751 | + get_profile_identities request example |
| 752 | + """ |
| 753 | + try: |
| 754 | + global profile_id, profile_identity_etag |
| 755 | + |
| 756 | + # begin-get_profile_identities |
| 757 | + |
| 758 | + response = iam_identity_service.get_profile_identities(profile_id=profile_id) |
| 759 | + |
| 760 | + # end-get_profile_identities |
| 761 | + print('\nget_profile_identities() response status code: ', response.get_status_code()) |
| 762 | + profile_identity_etag = response.get_headers()['Etag'] |
| 763 | + |
| 764 | + except ApiException as e: |
| 765 | + pytest.fail(str(e)) |
| 766 | + |
| 767 | + @needscredentials |
| 768 | + def test_set_profile_identities(self): |
| 769 | + """ |
| 770 | + set_profile_identities request example |
| 771 | + """ |
| 772 | + try: |
| 773 | + global profile_id, profile_identity_etag |
| 774 | + |
| 775 | + # begin-set_profile_identities |
| 776 | + accounts = [account_id] |
| 777 | + profileIdentity = ProfileIdentity( |
| 778 | + identifier=iam_id, accounts=accounts, type="user", description="Identity description" |
| 779 | + ) |
| 780 | + profile_identities_input = [profileIdentity] |
| 781 | + |
| 782 | + response = iam_identity_service.set_profile_identities( |
| 783 | + profile_id=profile_id, if_match=profile_identity_etag, identities=profile_identities_input |
| 784 | + ) |
| 785 | + |
| 786 | + # end-set_profile_identities |
| 787 | + print('\nset_profile_identities() response status code: ', response.get_status_code()) |
| 788 | + |
| 789 | + except ApiException as e: |
| 790 | + pytest.fail(str(e)) |
| 791 | + |
| 792 | + @needscredentials |
| 793 | + def test_set_profile_identity(self): |
| 794 | + """ |
| 795 | + set_profile_identity request example |
| 796 | + """ |
| 797 | + try: |
| 798 | + global profile_id |
| 799 | + |
| 800 | + # begin-set_profile_identity |
| 801 | + accounts = [account_id] |
| 802 | + response = iam_identity_service.set_profile_identity( |
| 803 | + profile_id=profile_id, |
| 804 | + identity_type="user", |
| 805 | + identifier=iam_id_member, |
| 806 | + type="user", |
| 807 | + accounts=accounts, |
| 808 | + description="Identity description", |
| 809 | + ) |
| 810 | + |
| 811 | + # end-set_profile_identity |
| 812 | + print('\nset_profile_identities() response status code: ', response.get_status_code()) |
| 813 | + except ApiException as e: |
| 814 | + pytest.fail(str(e)) |
| 815 | + |
| 816 | + @needscredentials |
| 817 | + def test_get_profile_identity(self): |
| 818 | + """ |
| 819 | + get_profile_identity request example |
| 820 | + """ |
| 821 | + try: |
| 822 | + global profile_id |
| 823 | + |
| 824 | + # begin-get_profile_identity |
| 825 | + |
| 826 | + response = iam_identity_service.get_profile_identity( |
| 827 | + profile_id=profile_id, identity_type="user", identifier_id=iam_id_member |
| 828 | + ) |
| 829 | + |
| 830 | + # end-get_profile_identity |
| 831 | + print('\nget_profile_identities() response status code: ', response.get_status_code()) |
| 832 | + except ApiException as e: |
| 833 | + pytest.fail(str(e)) |
| 834 | + |
| 835 | + @needscredentials |
| 836 | + def test_delete_profile_identity(self): |
| 837 | + """ |
| 838 | + delete_profile_identity request example |
| 839 | + """ |
| 840 | + try: |
| 841 | + global profile_id |
| 842 | + |
| 843 | + # begin-delete_profile_identity |
| 844 | + |
| 845 | + response = iam_identity_service.delete_profile_identity( |
| 846 | + profile_id=profile_id, identity_type="user", identifier_id=iam_id_member |
| 847 | + ) |
| 848 | + |
| 849 | + # end-delete_profile_identity |
| 850 | + print('\ndelete_profile_identity() response status code: ', response.get_status_code()) |
| 851 | + except ApiException as e: |
| 852 | + pytest.fail(str(e)) |
| 853 | + |
747 | 854 | @needscredentials
|
748 | 855 | def test_delete_profile_example(self):
|
749 | 856 | """
|
|
0 commit comments