X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fosmrepo.py;fp=osmclient%2Fsol005%2Fosmrepo.py;h=efd2207a9392deb06fa9734a80f7a608c32c3534;hb=3c1603818230f52cf5102fdfbdd8fd8907062e8d;hp=c2bb0c9d0cb875d9ded7a16d43ccc6d6a6cf92cf;hpb=6cda5b06ea314ddf61b7a463aa45048123c6c40d;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/osmrepo.py b/osmclient/sol005/osmrepo.py index c2bb0c9..efd2207 100644 --- a/osmclient/sol005/osmrepo.py +++ b/osmclient/sol005/osmrepo.py @@ -150,6 +150,7 @@ class OSMRepo(Repo): :param origin: origin directory for getting all the artifacts :param destination: destination folder for create and index the valid artifacts """ + self._logger.debug("") if destination == '.': if origin == destination: destination = 'repository' @@ -179,6 +180,7 @@ class OSMRepo(Repo): :param fname: file path :return: checksum string """ + self._logger.debug("") hash_md5 = hashlib.md5() with open(fname, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): @@ -193,6 +195,7 @@ class OSMRepo(Repo): :param package_type: type of artifact (vnf or ns) :return: fields """ + self._logger.debug("") fields = {} base_path = '/{}/'.format(package_type) aux_dict = {} @@ -252,6 +255,7 @@ class OSMRepo(Repo): :param path: file path :return: status details, status, fields, package_type """ + self._logger.debug("") package_type = '' folder = '' try: @@ -291,6 +295,7 @@ class OSMRepo(Repo): file: VNF or NS destination: path for index creation """ + self._logger.debug("") pt = PackageTool() compresed = False try: @@ -320,6 +325,7 @@ class OSMRepo(Repo): :param package_type: package type (vnf, ns) :param fields: dict with the required values """ + self._logger.debug("") data_ind = {'name': fields.get('name'), 'description': fields.get('description'), 'vendor': fields.get('vendor'), 'path': fields.get('path')} @@ -360,6 +366,7 @@ class OSMRepo(Repo): Datetime Generator :return: Datetime as string with the following structure "2020-04-29T08:41:07.681653Z" """ + self._logger.debug("") return time.strftime('%Y-%m-%dT%H:%M:%S.%sZ') def init_directory(self, destination): @@ -368,6 +375,7 @@ class OSMRepo(Repo): :param destination: :return: """ + self._logger.debug("") if not isdir(destination): mkdir(destination) if not isfile(join(destination, 'index.yaml')): @@ -377,3 +385,4 @@ class OSMRepo(Repo): 'ns_packages': {}} with open(join(destination, 'index.yaml'), 'w') as outfile: ruamel.yaml.dump(index_data, outfile, default_flow_style=False) +