示例#1
0
文件: app.py 项目: cloudControl/cctrl
 def showAlias(self, args):
     """
         Shows the details of an alias.
     """
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         deployment_name = "default"
     if not args.alias:
         aliases = self.api.read_aliases(app_name, deployment_name)
         print_alias_list(aliases)
         return True
     else:
         try:
             alias = self.api.read_alias(app_name, args.alias, deployment_name)
         except GoneError:
             raise InputErrorException("WrongAlias")
         else:
             print_alias_details(alias)
             return True
示例#2
0
文件: app.py 项目: guetux/cctrl
 def showAlias(self, args):
     """
         Shows the details of an alias.
     """
     #noinspection PyTupleAssignmentBalance
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         raise InputErrorException('NoDeployment')
     if not args.alias:
         aliases = self.api.read_aliases(app_name, deployment_name)
         print_alias_list(aliases)
         return True
     else:
         try:
             alias = self.api.read_alias(
                 app_name,
                 args.alias,
                 deployment_name)
         except GoneError:
             raise InputErrorException('WrongAlias')
         else:
             print_alias_details(alias)
             return True
示例#3
0
 def showAlias(self, args):
     """
         Shows the details of an alias.
     """
     #noinspection PyTupleAssignmentBalance
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         raise InputErrorException('NoDeployment')
     if not args.alias:
         aliases = self.api.read_aliases(app_name, deployment_name)
         print_alias_list(aliases)
         return True
     else:
         try:
             alias = self.api.read_alias(
                 app_name,
                 args.alias,
                 deployment_name)
         except GoneError:
             raise InputErrorException('WrongAlias')
         else:
             print_alias_details(alias)
             return True