"--projects",
# prompt="Comma separate list of projects",
multiple=True,
- callback=lambda ctx, param, value: "".join(value).split(",")
- if all(len(x) == 1 for x in value)
- else value,
+ callback=lambda ctx, param, value: (
+ "".join(value).split(",") if all(len(x) == 1 for x in value) else value
+ ),
help="list of project ids that the user belongs to",
)
@click.option(
user["username"],
user["_id"],
user["_admin"]["user_status"].upper(),
- time.strftime(
- "%b-%d-%Y %X",
- time.gmtime(user["_admin"]["account_expire_time"]),
- )
- if not user["username"] == "admin"
- else user["_admin"]["account_expire_time"],
+ (
+ time.strftime(
+ "%b-%d-%Y %X",
+ time.gmtime(user["_admin"]["account_expire_time"]),
+ )
+ if not user["username"] == "admin"
+ else user["_admin"]["account_expire_time"]
+ ),
]
)
else:
self._manifest_metadata[self._MANIFEST_VNFD_PROVIDER_ID] = vnfd_data.get(
"provider", "OSM"
)
- self._manifest_metadata[
- self._MANIFEST_VNFD_SOFTWARE_VERSION
- ] = vnfd_data.get("version", "1.0")
+ self._manifest_metadata[self._MANIFEST_VNFD_SOFTWARE_VERSION] = (
+ vnfd_data.get("version", "1.0")
+ )
self._manifest_metadata[self._MANIFEST_VNFD_PACKAGE_VERSION] = "1.0.0"
self._manifest_metadata[self._MANIFEST_VNFD_RELEASE_DATE_TIME] = (
datetime.datetime.now().astimezone().isoformat()
self._manifest_metadata[self._MANIFEST_NSD_DESIGNER] = nsd_data.get(
"designer", "OSM"
)
- self._manifest_metadata[
- self._MANIFEST_NSD_FILE_STRUCTURE_VERSION
- ] = nsd_data.get("version", "1.0")
+ self._manifest_metadata[self._MANIFEST_NSD_FILE_STRUCTURE_VERSION] = (
+ nsd_data.get("version", "1.0")
+ )
self._manifest_metadata[self._MANIFEST_NSD_RELEASE_DATE_TIME] = (
datetime.datetime.now().astimezone().isoformat()
)
index["{}_packages".format(package_type)][fields.get("id")] = {
fields.get("version"): data_ind
}
- index["{}_packages".format(package_type)][fields.get("id")][
- "latest"
- ] = fields.get("version")
+ index["{}_packages".format(package_type)][fields.get("id")]["latest"] = (
+ fields.get("version")
+ )
yaml.safe_dump(
index,
open(join(destination, "index.yaml"), "w"),
#######################################################################################
[testenv:black]
-deps = black
+deps = black==24.1.1
skip_install = true
commands =
black --check --diff osmclient/
#######################################################################################
[testenv:flake8]
-deps = flake8
+deps = flake8==7.0.0
commands =
flake8 osmclient/ setup.py
deps = {[testenv]deps}
-r{toxinidir}/requirements-dev.txt
-r{toxinidir}/requirements-test.txt
- pylint
+ pylint==3.0.3
commands =
pylint -E osmclient/