@@ -57,7 +57,7 @@ def delete_note(note_id, project_id):
5757
5858 client = containeranalysis_v1 .ContainerAnalysisClient ()
5959 grafeas_client = client .get_grafeas_client ()
60- note_name = grafeas_client . note_path ( project_id , note_id )
60+ note_name = f"projects/ { project_id } /notes/ { note_id } "
6161
6262 grafeas_client .delete_note (note_name )
6363# [END containeranalysis_delete_note]
@@ -77,7 +77,7 @@ def create_occurrence(resource_url, note_id, occurrence_project, note_project):
7777
7878 client = containeranalysis_v1 .ContainerAnalysisClient ()
7979 grafeas_client = client .get_grafeas_client ()
80- formatted_note = grafeas_client . note_path ( note_project , note_id )
80+ formatted_note = f"projects/ { note_project } /notes/ { note_id } "
8181 formatted_project = grafeas_client .project_path (occurrence_project )
8282
8383 occurrence = {
@@ -113,7 +113,7 @@ def delete_occurrence(occurrence_id, project_id):
113113
114114 client = containeranalysis_v1 .ContainerAnalysisClient ()
115115 grafeas_client = client .get_grafeas_client ()
116- parent = grafeas_client . occurrence_path ( project_id , occurrence_id )
116+ parent = f"projects/ { project_id } /occurrences/ { occurrence_id } "
117117 grafeas_client .delete_occurrence (parent )
118118# [END containeranalysis_delete_occurrence]
119119
@@ -128,7 +128,7 @@ def get_note(note_id, project_id):
128128
129129 client = containeranalysis_v1 .ContainerAnalysisClient ()
130130 grafeas_client = client .get_grafeas_client ()
131- note_name = grafeas_client . note_path ( project_id , note_id )
131+ note_name = f"projects/ { project_id } /notes/ { note_id } "
132132 response = grafeas_client .get_note (note_name )
133133 return response
134134# [END containeranalysis_get_note]
@@ -144,7 +144,7 @@ def get_occurrence(occurrence_id, project_id):
144144
145145 client = containeranalysis_v1 .ContainerAnalysisClient ()
146146 grafeas_client = client .get_grafeas_client ()
147- parent = grafeas_client . occurrence_path ( project_id , occurrence_id )
147+ parent = f"projects/ { project_id } /occurrences/ { occurrence_id } "
148148 return grafeas_client .get_occurrence (parent )
149149# [END containeranalysis_get_occurrence]
150150
@@ -181,7 +181,7 @@ def get_occurrences_for_note(note_id, project_id):
181181
182182 client = containeranalysis_v1 .ContainerAnalysisClient ()
183183 grafeas_client = client .get_grafeas_client ()
184- note_name = grafeas_client . note_path ( project_id , note_id )
184+ note_name = f"projects/ { project_id } /notes/ { note_id } "
185185
186186 response = grafeas_client .list_note_occurrences (note_name )
187187 count = 0
0 commit comments