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