self,
entity: str,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> str:
cert = self.cert_key_store.get_cert(entity, service_name or '', hostname or '')
if not cert:
+ if no_exception_when_missing:
+ return ''
raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
return cert
self,
entity: str,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> str:
key = self.cert_key_store.get_key(entity, service_name or '', hostname or '')
if not key:
+ if no_exception_when_missing:
+ return ''
raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
return key
self,
entity: str,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> OrchResult[str]:
raise NotImplementedError()
self,
entity: str,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> OrchResult[str]:
raise NotImplementedError()
entity: str,
_end_positional_: int = 0,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> HandleCommandResult:
- completion = self.cert_store_get_cert(entity, service_name, hostname)
+ completion = self.cert_store_get_cert(
+ entity,
+ service_name,
+ hostname,
+ no_exception_when_missing
+ )
cert = raise_if_exception(completion)
return HandleCommandResult(stdout=cert)
entity: str,
_end_positional_: int = 0,
service_name: Optional[str] = None,
- hostname: Optional[str] = None
+ hostname: Optional[str] = None,
+ no_exception_when_missing: bool = False
) -> HandleCommandResult:
- completion = self.cert_store_get_key(entity, service_name, hostname)
+ completion = self.cert_store_get_key(
+ entity,
+ service_name,
+ hostname,
+ no_exception_when_missing
+ )
key = raise_if_exception(completion)
return HandleCommandResult(stdout=key)