X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fviews%2Focloud_dto.py;h=df8385a3fc58bc8793aeccd4d93a15dc03a50283;hb=refs%2Fchanges%2F88%2F9388%2F1;hp=c8e520237d97f4516e9a1f4dcb846c7dfc2280af;hpb=52d9e382d966d6ee095831f3274170e9e1d17dfa;p=pti%2Fo2.git diff --git a/o2ims/views/ocloud_dto.py b/o2ims/views/ocloud_dto.py index c8e5202..df8385a 100644 --- a/o2ims/views/ocloud_dto.py +++ b/o2ims/views/ocloud_dto.py @@ -75,46 +75,6 @@ class ResourceDTO: } ) - list_result = api_ims_inventory_v1.model( - "ResourceListPagenationDto", - { - 'count': fields.Integer(), - 'page_num': fields.Integer(), - 'results': fields.List(fields.Nested(resource_list)) - } - ) - - # def get_paginated_list(results, url, start, limit): - # start = int(start) - # limit = int(limit) - # count = len(results) - # if count < start or limit < 0: - # api_ims_inventory_v1.abort(404) - # # make response - # obj = {} - # obj['start'] = start - # obj['limit'] = limit - # obj['count'] = count - # # make URLs - # # make previous url - # if start == 1: - # obj['previous'] = '' - # else: - # start_copy = max(1, start - limit) - # limit_copy = start - 1 - # obj['previous'] = url + \ - # '?start=%d&limit=%d' % (start_copy, limit_copy) - # # make next url - # if start + limit > count: - # obj['next'] = '' - # else: - # start_copy = start + limit - # obj['next'] = url + '?start=%d&limit=%d' % (start_copy, limit) - # # finally extract result according to bounds - # # obj['results'] = results[(start - 1):(start - 1 + limit)] - # obj['result'] = fields.List(fields.Nested(ResourceDTO.resource_list)) - # return obj - def recursive_resource_mapping(iteration_number=2): resource_json_mapping = { 'resourceId': fields.String(required=True,