Esempio n. 1
0
    def Run(self, args):
        """Run the 'gcloud firebase test network-profiles list' command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation (i.e. group and command arguments combined).

    Returns:
      The list of network profiles we want to have printed later or None.
    """
        catalog = util.GetNetworkProfileCatalog(self.context)
        return getattr(catalog, 'configurations', None)
Esempio n. 2
0
    def Run(self, args):
        """Run the 'gcloud firebase test network-profiles describe' command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation (i.e. group and command arguments combined).

    Returns:
      The testing_v1_messages.NetworkConfiguration object to describe.
    """
        catalog = util.GetNetworkProfileCatalog(self.context)
        for profile in catalog.configurations:
            if profile.id == args.profile_id:
                return profile
        raise exceptions.NetworkProfileNotFoundError(args.profile_id)