Skip to content

Commit

Permalink
Merge pull request #35 from cloudblue/LITE-25144-fix-validation
Browse files Browse the repository at this point in the history
LITE-25144 fix validation, fix config injection function
  • Loading branch information
ffaraone authored Oct 4, 2022
2 parents 2039089 + 73bc437 commit b91ba5f
Show file tree
Hide file tree
Showing 26 changed files with 2,365 additions and 1,932 deletions.
12 changes: 0 additions & 12 deletions connect/eaas/core/inject/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,3 @@ async def get_installation(
x_connect_installation_id: str = Header(),
):
return await client("devops").installations[x_connect_installation_id].get()


async def get_environment(
client: AsyncConnectClient = Depends(get_extension_client),
x_connect_extension_id: str = Header(),
x_connect_environment_id: str = Header(),
):
extension = client('devops').services[x_connect_extension_id]
return {
variable['name']: variable['value']
async for variable in extension.environments[x_connect_environment_id].variables.all()
}
4 changes: 4 additions & 0 deletions connect/eaas/core/inject/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ def get_logger(
logger,
context.dict(),
)


def get_config(x_connect_config: str = Header('{}')):
return json.loads(x_connect_config)
12 changes: 0 additions & 12 deletions connect/eaas/core/inject/synchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,3 @@ def get_installation(
x_connect_installation_id: str = Header(),
):
return client('devops').installations[x_connect_installation_id].get()


def get_environment(
client: ConnectClient = Depends(get_extension_client),
x_connect_extension_id: str = Header(),
x_connect_environment_id: str = Header(),
):
extension = client('devops').services[x_connect_extension_id]
return {
variable['name']: variable['value']
for variable in extension.environments[x_connect_environment_id].variables.all()
}
Loading

0 comments on commit b91ba5f

Please sign in to comment.