Exemplo n.º 1
0
Arquivo: app.py Projeto: guetux/cctrl
 def showAddon(self, args):
     """
         Shows the details of an addon.
     """
     #noinspection PyTupleAssignmentBalance
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         raise InputErrorException('NoDeployment')
     if not args.addon:
         try:
             addons = self.api.read_addons(app_name, deployment_name)
         except:
             raise
         else:
             print_addon_list(addons)
             return True
     else:
         try:
             addon = self.api.read_addon(
                 app_name,
                 deployment_name,
                 args.addon)
         except GoneError:
             raise InputErrorException('WrongAddon')
         else:
             print_addon_details(addon)
             return True
Exemplo n.º 2
0
 def showAddon(self, args):
     """
         Shows the details of an addon.
     """
     #noinspection PyTupleAssignmentBalance
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         raise InputErrorException('NoDeployment')
     if not args.addon:
         try:
             addons = self.api.read_addons(app_name, deployment_name)
         except:
             raise
         else:
             print_addon_list(addons)
             return True
     else:
         try:
             addon = self.api.read_addon(
                 app_name,
                 deployment_name,
                 args.addon)
         except GoneError:
             raise InputErrorException('WrongAddon')
         else:
             print_addon_details(addon)
             return True
Exemplo n.º 3
0
 def showAddon(self, args):
     """
         Shows the details of an addon.
     """
     app_name, deployment_name = self.parse_app_deployment_name(args.name)
     if not deployment_name:
         deployment_name = "default"
     if not args.addon:
         try:
             addons = self.api.read_addons(app_name, deployment_name)
         except:
             raise
         else:
             print_addon_list(addons)
             return True
     else:
         try:
             addon = self.api.read_addon(app_name, deployment_name, args.addon)
         except GoneError:
             raise InputErrorException("WrongAddon")
         else:
             print_addon_details(addon)
             return True