Skip to content

Commit 38d309a

Browse files
feat(Global Search/Tagging): regenerated services with latest API definition
Signed-off-by: francescadecicco <[email protected]>
1 parent ca810c7 commit 38d309a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

examples/test_global_tagging_v1_examples.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,29 @@ def test_attach_tag_example(self):
141141
except ApiException as e:
142142
pytest.fail(str(e))
143143

144+
@needscredentials
145+
def test_attach_tag_query_example(self):
146+
"""
147+
attach_tag request example
148+
"""
149+
try:
150+
print('\nattach_tag() result:')
151+
# begin-attach_tag
152+
153+
filter = 'crn: "%s"' (resource_crn)
154+
query_string_model = {'query_string': 'resource_crn}
155+
156+
tag_results = global_tagging_service.attach_tag(
157+
query=query_string_model, tag_names=['tag_test_3', 'tag_test_4'], tag_type='user'
158+
).get_result()
159+
160+
print(json.dumps(tag_results, indent=2))
161+
162+
# end-attach_tag
163+
164+
except ApiException as e:
165+
pytest.fail(str(e))
166+
144167
@needscredentials
145168
def test_detach_tag_example(self):
146169
"""
@@ -163,6 +186,29 @@ def test_detach_tag_example(self):
163186
except ApiException as e:
164187
pytest.fail(str(e))
165188

189+
@needscredentials
190+
def test_detach_tag_query_example(self):
191+
"""
192+
detach_tag request example
193+
"""
194+
try:
195+
print('\nattach_tag() result:')
196+
# begin-attach_tag
197+
198+
filter = 'crn: "%s"' (resource_crn)
199+
query_string_model = {'query_string': 'resource_crn}
200+
201+
tag_results = global_tagging_service.detach_tag(
202+
query=query_string_model, tag_names=['tag_test_3', 'tag_test_4'], tag_type='user'
203+
).get_result()
204+
205+
print(json.dumps(tag_results, indent=2))
206+
207+
# end-attach_tag
208+
209+
except ApiException as e:
210+
pytest.fail(str(e))
211+
166212
@needscredentials
167213
def test_delete_tag_example(self):
168214
"""

0 commit comments

Comments
 (0)