1# -*- coding: utf-8 -*- #
2# Copyright 2016 Google LLC. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15"""The gcloud bigtable emulator group."""
16
17from __future__ import absolute_import
18from __future__ import division
19from __future__ import unicode_literals
20
21from googlecloudsdk.calliope import base
22from googlecloudsdk.command_lib.emulators import bigtable_util
23from googlecloudsdk.command_lib.emulators import util
24from googlecloudsdk.core import exceptions
25from googlecloudsdk.core.util import platforms
26
27
28class UnsupportedPlatformError(exceptions.Error):
29  pass
30
31
32@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA)
33class Bigtable(base.Group):
34  """Manage your local Bigtable emulator.
35
36  This set of commands allows you to start and use a local Bigtable emulator.
37  """
38
39  detailed_help = {
40      'EXAMPLES':
41          """\
42          To start a local Bigtable emulator, run:
43
44            $ {command} start
45          """,
46  }
47
48  # Override
49  def Filter(self, context, args):
50    util.EnsureComponentIsInstalled(bigtable_util.BIGTABLE,
51                                    bigtable_util.BIGTABLE_TITLE)
52