def details(self, args): """ Print application or deployment details. e.g.: 'cctrlapp APP_NAME details' prints application details 'cctrlapp APP_NAME/DEP_NAME details' prints deployment details """ #noinspection PyTupleAssignmentBalance app_name, deployment_name = self.parse_app_deployment_name(args.name) if deployment_name: try: deployment = self.api.read_deployment( app_name, deployment_name) except GoneError: raise InputErrorException('WrongDeployment') else: print_deployment_details(deployment) else: try: app = self.api.read_app(app_name) except GoneError: raise InputErrorException('WrongApplication') else: print_app_details(app)
def details(self, args): """ Print application or deployment details. e.g.: 'cctrlapp APP_NAME details' prints application details 'cctrlapp APP_NAME/DEP_NAME details' prints deployment details """ app_name, deployment_name, obj = self._details(args.name) if deployment_name: print_deployment_details(obj) else: print_app_details(obj)