Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

fix: correct region tag formatting #102

Merged
merged 4 commits into from Aug 18, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions samples/snippets/sample_pagination.py
Expand Up @@ -14,14 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START compute_images_list_page ]
# [START compute_images_list ]
# [START compute_images_list_page]
# [START compute_images_list]
import google.cloud.compute_v1 as compute_v1
# [END compute_images_list ]
# [END compute_images_list_page ]
# [END compute_images_list]
# [END compute_images_list_page]


# [START compute_images_list ]
# [START compute_images_list]
def print_images_list(project: str) -> None:
"""
Prints a list of all non-deprecated image names available in given project.
Expand All @@ -42,10 +42,10 @@ def print_images_list(project: str) -> None:
# requests to the API for you, so you can simply iterate over all the images.
for img in images_client.list(request=images_list_request):
print(f" - {img.name}")
# [END compute_images_list ]
# [END compute_images_list]


# [START compute_images_list_page ]
# [START compute_images_list_page]
def print_images_list_by_page(project: str, page_size: int = 10) -> None:
"""
Prints a list of all non-deprecated image names available in a given project,
Expand All @@ -70,7 +70,7 @@ def print_images_list_by_page(project: str, page_size: int = 10) -> None:
print(f"Page {page_num}: ")
for img in page.items:
print(f" - {img.name}")
# [END compute_images_list_page ]
# [END compute_images_list_page]


if __name__ == '__main__':
Expand Down