Exemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        if container_command_util.GetUseV1APIProperty():
            warning = messages.GetAPIMismatchingWarning(self.ReleaseTrack())
            if warning:
                log.warning(warning)

        super(GetServerConfigAlphaBeta, self).__init__(*args, **kwargs)
        self.location_get = container_command_util.GetZoneOrRegion
Exemplo n.º 2
0
    def Filter(self, context, args):
        """Modify the context that will be given to this group's commands when run.

    Args:
      context: {str:object}, A set of key-value pairs that can be used for
          common initialization among commands.
      args: argparse.Namespace: The same namespace given to the corresponding
          .Run() invocation.

    Returns:
      The refined command context.
    """
        if container_command_util.GetUseV1APIProperty():
            warning = messages.GetAPIMismatchingWarning(self.ReleaseTrack())
            if warning:
                log.warning(warning)

        return context