Ejemplo n.º 1
0
# Copyright 2015 Google Inc. All Rights Reserved.
"""Command for listing groups."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List Google Compute Engine groups."""
    @property
    def service(self):
        return self.computeaccounts.groups

    @property
    def resource_type(self):
        return 'groups'

    @property
    def messages(self):
        return self.computeaccounts.MESSAGES_MODULE


List.detailed_help = base_classes.GetGlobalListerHelp('groups')
Ejemplo n.º 2
0
        filter_expr = self.GetFilterExpr(args)

        image_projects = [self.project]

        if args.standard_images:
            image_projects.extend(constants.PUBLIC_IMAGE_PROJECTS)

        if args.preview_images:
            image_projects.extend(constants.PREVIEW_IMAGE_PROJECTS)

        requests = []
        for project in image_projects:
            requests.append((self.service, 'List',
                             self.messages.ComputeImagesListRequest(
                                 filter=filter_expr,
                                 maxResults=constants.MAX_RESULTS_PER_PAGE,
                                 project=project)))

        images = request_helper.MakeRequests(requests=requests,
                                             http=self.http,
                                             batch_url=self.batch_url,
                                             errors=errors,
                                             custom_get_requests=None)

        for image in images:
            if not image.deprecated or args.show_deprecated:
                yield image


List.detailed_help = base_classes.GetGlobalListerHelp('images')
Ejemplo n.º 3
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing SSL certificates."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List Google Compute Engine SSL certificates."""
    @property
    def service(self):
        return self.compute.sslCertificates

    @property
    def resource_type(self):
        return 'sslCertificates'


List.detailed_help = base_classes.GetGlobalListerHelp('SSL certificates')
Ejemplo n.º 4
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing regions."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
  """List Google Compute Engine regions."""

  @property
  def service(self):
    return self.compute.regions

  @property
  def resource_type(self):
    return 'regions'


List.detailed_help = base_classes.GetGlobalListerHelp('regions')
Ejemplo n.º 5
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing HTTP health checks."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List HTTP health checks."""
    @property
    def service(self):
        return self.compute.httpHealthChecks

    @property
    def resource_type(self):
        return 'httpHealthChecks'


List.detailed_help = base_classes.GetGlobalListerHelp('health checks')
Ejemplo n.º 6
0
# Copyright 2015 Google Inc. All Rights Reserved.
"""Command for listing users."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List Google Compute Engine users."""
    @property
    def service(self):
        return self.computeaccounts.users

    @property
    def resource_type(self):
        return 'users'

    @property
    def messages(self):
        return self.computeaccounts.MESSAGES_MODULE


List.detailed_help = base_classes.GetGlobalListerHelp('users')
Ejemplo n.º 7
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing URL maps."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
  """List URL maps."""

  @property
  def service(self):
    return self.compute.urlMaps

  @property
  def resource_type(self):
    return 'urlMaps'


List.detailed_help = base_classes.GetGlobalListerHelp('URL maps')
Ejemplo n.º 8
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing snapshots."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List Google Compute Engine snapshots."""
    @property
    def service(self):
        return self.compute.snapshots

    @property
    def resource_type(self):
        return 'snapshots'


List.detailed_help = base_classes.GetGlobalListerHelp('snapshots')
Ejemplo n.º 9
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing backend services."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
    """List backend services."""
    @property
    def service(self):
        return self.compute.backendServices

    @property
    def resource_type(self):
        return 'backendServices'


List.detailed_help = base_classes.GetGlobalListerHelp('backend services')
Ejemplo n.º 10
0
# Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing target HTTPS proxies."""
from googlecloudsdk.compute.lib import base_classes


class List(base_classes.GlobalLister):
  """List target HTTPS proxies."""

  @property
  def service(self):
    return self.compute.targetHttpsProxies

  @property
  def resource_type(self):
    return 'targetHttpsProxies'


List.detailed_help = base_classes.GetGlobalListerHelp('target HTTPS proxies')