Files
update/software/software/api/controllers/v1/software.py
Bin Qian e0415cd65b New USM REST API
Updated the USM REST Api as agreed
Also applied the standardized CLI output w/ tabulate for CLI commands.

Fixed a few things:
1. software upload column header change to "Release"
2. use region_name from usm.conf to replace default "RegionOne" as local
   region.
3. temporarily skip the ParsableErrorMiddleware.
4. do not recreate http exceptions based on the http status_code on
   the client side, use common display function to display the http
   error.
5. expose webob.exc.HTTPClientError to the client side.
6. updated --debug output to include CLI output at the end.

Test Cases:
    passed all CLI commands, verify the endpoints and request body.
    passed verify CLI requests compiled with defined REST Api.

Story: 2010676
Task: 49905

Change-Id: I5ab971b455aed527b7b1a21396b97334ba1e05ab
2024-04-26 15:54:21 +00:00

20 lines
425 B
Python

"""
Copyright (c) 2023-2024 Wind River Systems, Inc.
SPDX-License-Identifier: Apache-2.0
"""
import logging
from pecan import expose
from pecan.rest import RestController
from software.software_controller import sc
LOG = logging.getLogger('main_logger')
class SoftwareAPIController(RestController):
@expose(method='GET', template='json')
def in_sync_controller(self):
return sc.in_sync_controller_api()