Commit ae037f37 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add ccds.validate & ccds.list

parent 475ea658
Pipeline #11700 failed with stage
in 0 seconds
...@@ -113,6 +113,14 @@ class CCDS: ...@@ -113,6 +113,14 @@ class CCDS:
else: else:
print(f"refs_abspath: {refs_abspath}") print(f"refs_abspath: {refs_abspath}")
def validate(self, pmapname: str) -> bool:
"""Validate pmap."""
return client.api.check_mapping_exists(pmapname)
def list(self):
"""List all pmap."""
return client.api.list_mappings(glob_pattern="*.pmap")
if __name__ == "__main__": if __name__ == "__main__":
ccds = CCDS() ccds = CCDS()
......
"""
Identifier: csst_common/ccds/__init__.py
Name: __init__.py
Description: CCDS wrapper
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2023-12-15, Bo Zhang, created
2023-12-15, Bo Zhang, add CCDS wrapper
"""
from .ccds import CCDS
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment