introduce credentials api
parent
1a90f2dfe2
commit
ca6b693a9a
@ -1,15 +1,24 @@
|
||||
import deprecation
|
||||
from .python_util import execute
|
||||
|
||||
|
||||
@deprecation.deprecated(
|
||||
deprecated_in="3.2", details="use infrastructure.CredentialsApi instead"
|
||||
)
|
||||
def gopass_field_from_path(path, field):
|
||||
credential = None
|
||||
if path and field:
|
||||
print('get field for: ' + path + ', ' + field)
|
||||
credential = execute(['gopass', 'show', path, field])
|
||||
print("get field for: " + path + ", " + field)
|
||||
credential = execute(["gopass", "show", path, field])
|
||||
return credential
|
||||
|
||||
|
||||
@deprecation.deprecated(
|
||||
deprecated_in="3.2", details="use infrastructure.CredentialsApi instead"
|
||||
)
|
||||
def gopass_password_from_path(path):
|
||||
credential = None
|
||||
if path:
|
||||
print('get password for: ' + path)
|
||||
credential = execute(['gopass', 'show', '--password', path])
|
||||
print("get password for: " + path)
|
||||
credential = execute(["gopass", "show", "--password", path])
|
||||
return credential
|
||||
|
@ -1,2 +1,10 @@
|
||||
from .infrastructure import FileApi, ImageApi, ResourceApi, ExecutionApi, ProjectRepository, EnvironmentApi
|
||||
from .infrastructure import (
|
||||
FileApi,
|
||||
ImageApi,
|
||||
ResourceApi,
|
||||
ExecutionApi,
|
||||
ProjectRepository,
|
||||
EnvironmentApi,
|
||||
CredentialsApi,
|
||||
)
|
||||
from .repository import DevopsRepository, BuildFileRepository
|
Loading…
Reference in New Issue