Skip to content

Commit 5e5d7fb

Browse files
authored
Merge pull request #52 from grycap/new_adm_api
New adm api
2 parents 179462a + a66b6e4 commit 5e5d7fb

21 files changed

+425
-192
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__pycache__/
22
.env
33
*.sqlite
4+
adim.egg-info

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## Overview
77

88
Application Deployment with Infrastructure Manager implements
9-
EOSC Application Deployment Management API.
9+
[EOSC Application Deployment Management API](https://github.com/EGI-Federation/eosc-application-deployment-manager).
1010

1111
## Requirements
1212

adim-api.yaml

Lines changed: 126 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ info:
33
title: ADIM API
44
description: Application Deployment with Infrastructure Manager implements EOSC
55
Application Deployment Management API
6-
version: 0.1.49
6+
version: 1.0.49
77
paths:
88
/deployments:
99
get:
@@ -376,7 +376,7 @@ paths:
376376
content:
377377
application/json:
378378
schema:
379-
$ref: '#/components/schemas/Allocation-Input'
379+
$ref: '#/components/schemas/Allocation'
380380
responses:
381381
'201':
382382
description: Accepted
@@ -509,7 +509,7 @@ paths:
509509
content:
510510
application/json:
511511
schema:
512-
$ref: '#/components/schemas/Allocation-Input'
512+
$ref: '#/components/schemas/Allocation'
513513
responses:
514514
'200':
515515
description: Success
@@ -553,6 +553,12 @@ paths:
553553
application/json:
554554
schema:
555555
$ref: '#/components/schemas/Error'
556+
'409':
557+
description: In use
558+
content:
559+
application/json:
560+
schema:
561+
$ref: '#/components/schemas/Error'
556562
'422':
557563
description: Validation Error
558564
content:
@@ -616,6 +622,12 @@ paths:
616622
application/json:
617623
schema:
618624
$ref: '#/components/schemas/Error'
625+
'409':
626+
description: In use
627+
content:
628+
application/json:
629+
schema:
630+
$ref: '#/components/schemas/Error'
619631
'422':
620632
description: Validation Error
621633
content:
@@ -658,6 +670,27 @@ paths:
658670
type: boolean
659671
default: false
660672
title: Allnodes
673+
- name: includePublished
674+
in: query
675+
required: false
676+
schema:
677+
type: boolean
678+
default: true
679+
title: Includepublished
680+
- name: includePersonal
681+
in: query
682+
required: false
683+
schema:
684+
type: boolean
685+
default: false
686+
title: Includepersonal
687+
- name: onlyFavorites
688+
in: query
689+
required: false
690+
schema:
691+
type: boolean
692+
default: false
693+
title: Onlyfavorites
661694
responses:
662695
'200':
663696
description: Success
@@ -787,24 +820,11 @@ paths:
787820
content:
788821
application/json:
789822
schema:
790-
$ref: '#/components/schemas/Success'
823+
type: string
824+
title: Response 200 Version Version Get
791825
components:
792826
schemas:
793-
Allocation-Input:
794-
oneOf:
795-
- $ref: '#/components/schemas/OpenStackEnvironment'
796-
- $ref: '#/components/schemas/EGIComputeEnvironment'
797-
- $ref: '#/components/schemas/KubernetesEnvironment'
798-
- $ref: '#/components/schemas/EoscNodeEnvironment'
799-
title: Allocation
800-
discriminator:
801-
propertyName: kind
802-
mapping:
803-
EGIComputeEnvironment: '#/components/schemas/EGIComputeEnvironment'
804-
EoscNodeEnvironment: '#/components/schemas/EoscNodeEnvironment'
805-
KubernetesEnvironment: '#/components/schemas/KubernetesEnvironment'
806-
OpenStackEnvironment: '#/components/schemas/OpenStackEnvironment'
807-
Allocation-Output:
827+
Allocation:
808828
oneOf:
809829
- $ref: '#/components/schemas/OpenStackEnvironment'
810830
- $ref: '#/components/schemas/EGIComputeEnvironment'
@@ -830,39 +850,36 @@ components:
830850
title: Id
831851
description: Unique identifier for this allocation
832852
infoLink:
833-
anyOf:
834-
- type: string
835-
maxLength: 2083
836-
minLength: 1
837-
format: uri
838-
- type: 'null'
853+
type: string
854+
maxLength: 2083
855+
minLength: 1
856+
format: uri
839857
title: Infolink
840858
description: Endpoint that returns more details about this entity
841859
type: object
842860
required:
843861
- id
862+
- infoLink
844863
title: AllocationId
845864
AllocationInfo:
846-
properties:
847-
id:
848-
type: string
849-
title: Id
850-
description: Unique identifier for this allocation
851-
self:
852-
anyOf:
853-
- type: string
865+
allOf:
866+
- $ref: '#/components/schemas/Allocation'
867+
- properties:
868+
id:
869+
type: string
870+
title: Id
871+
description: Unique identifier for this allocation
872+
self:
873+
type: string
854874
maxLength: 2083
855875
minLength: 1
856876
format: uri
857-
- type: 'null'
858-
title: Self
859-
description: Endpoint that returns the details of this allocation
860-
allocation:
861-
$ref: '#/components/schemas/Allocation-Output'
862-
type: object
863-
required:
864-
- id
865-
- allocation
877+
title: Self
878+
description: Endpoint that returns more details about this entity
879+
type: object
880+
required:
881+
- id
882+
- self
866883
title: AllocationInfo
867884
CloudQuota:
868885
properties:
@@ -914,11 +931,10 @@ components:
914931
$ref: '#/components/schemas/ToolId'
915932
inputs:
916933
anyOf:
917-
- additionalProperties: true
918-
type: object
934+
- items:
935+
$ref: '#/components/schemas/Property'
936+
type: array
919937
- type: 'null'
920-
additionalProperties: {}
921-
type: object
922938
title: Inputs
923939
description: Input values for the template
924940
type: object
@@ -938,26 +954,40 @@ components:
938954
title: Kind
939955
default: DeploymentId
940956
infoLink:
941-
anyOf:
942-
- type: string
943-
maxLength: 2083
944-
minLength: 1
945-
format: uri
946-
- type: 'null'
957+
type: string
958+
maxLength: 2083
959+
minLength: 1
960+
format: uri
947961
title: Infolink
948962
description: Endpoint that returns more details about this entity
949963
type: object
950964
required:
951965
- id
966+
- infoLink
952967
title: DeploymentId
953968
DeploymentInfo:
954969
properties:
955-
deployment:
956-
$ref: '#/components/schemas/Deployment'
970+
allocation:
971+
$ref: '#/components/schemas/AllocationId'
972+
tool:
973+
$ref: '#/components/schemas/ToolId'
974+
inputs:
975+
anyOf:
976+
- items:
977+
$ref: '#/components/schemas/Property'
978+
type: array
979+
- type: 'null'
980+
title: Inputs
981+
description: Input values for the template
982+
kind:
983+
type: string
984+
const: DeploymentInfo
985+
title: Kind
986+
default: DeploymentInfo
957987
id:
958988
type: string
959989
title: Id
960-
description: Unique identifier for this tool blueprint
990+
description: Unique identifier for this deployment
961991
status:
962992
type: string
963993
enum:
@@ -973,34 +1003,31 @@ components:
9731003
- deleted
9741004
title: Status
9751005
details:
976-
anyOf:
977-
- type: string
978-
- type: 'null'
1006+
type: string
9791007
title: Details
9801008
description: Additional information about the deployment status
1009+
default: ''
9811010
outputs:
982-
anyOf:
983-
- additionalProperties: true
984-
type: object
985-
- type: 'null'
986-
additionalProperties: {}
987-
type: object
1011+
items:
1012+
$ref: '#/components/schemas/Property'
1013+
type: array
9881014
title: Outputs
989-
description: Deployed Template output values
1015+
description: Output values from the deployed template
1016+
default: []
9901017
self:
991-
anyOf:
992-
- type: string
993-
maxLength: 2083
994-
minLength: 1
995-
format: uri
996-
- type: 'null'
1018+
type: string
1019+
maxLength: 2083
1020+
minLength: 1
1021+
format: uri
9971022
title: Self
9981023
description: Endpoint that returns the details of this tool blueprint
9991024
type: object
10001025
required:
1001-
- deployment
1026+
- allocation
1027+
- tool
10021028
- id
10031029
- status
1030+
- self
10041031
title: DeploymentInfo
10051032
EGIComputeEnvironment:
10061033
properties:
@@ -1098,6 +1125,16 @@ components:
10981125
- type: 'null'
10991126
title: Nodename
11001127
description: Name of the EOSC node where this environment was allocated
1128+
nodeUI:
1129+
anyOf:
1130+
- type: string
1131+
maxLength: 2083
1132+
minLength: 1
1133+
format: uri
1134+
- type: 'null'
1135+
title: Nodeui
1136+
description: URL to the interactive UI of the EOSC node where this environment
1137+
was allocated
11011138
nodeId:
11021139
type: string
11031140
title: Nodeid
@@ -1457,6 +1494,18 @@ components:
14571494
- elements
14581495
title: PageOfTools
14591496
description: Page of Tools
1497+
Property:
1498+
properties:
1499+
name:
1500+
type: string
1501+
title: Name
1502+
value:
1503+
title: Value
1504+
type: object
1505+
required:
1506+
- name
1507+
- value
1508+
title: Property
14601509
Quota:
14611510
properties:
14621511
used:
@@ -1507,17 +1556,16 @@ components:
15071556
title: Version
15081557
default: latest
15091558
infoLink:
1510-
anyOf:
1511-
- type: string
1512-
maxLength: 2083
1513-
minLength: 1
1514-
format: uri
1515-
- type: 'null'
1559+
type: string
1560+
maxLength: 2083
1561+
minLength: 1
1562+
format: uri
15161563
title: Infolink
15171564
description: URL that returns the full details of this tool blueprint
15181565
type: object
15191566
required:
15201567
- id
1568+
- infoLink
15211569
title: ToolId
15221570
ToolInfo:
15231571
properties:
@@ -1642,11 +1690,6 @@ components:
16421690
type:
16431691
type: string
16441692
title: Error Type
1645-
input:
1646-
title: Input
1647-
ctx:
1648-
type: object
1649-
title: Context
16501693
type: object
16511694
required:
16521695
- loc

adim/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from adim.utils.tool.tool_store import ToolStore
2121
from adim.utils.allocation.allocation_store import AllocationStore
2222

23-
__version__ = "0.5.0"
23+
__version__ = "0.6.0"
2424

2525
load_dotenv()
2626

adim/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def create_app():
2525
title="ADIM API",
2626
description=("Application Deployment with Infrastructure Manager "
2727
"implements EOSC Application Deployment Management API"),
28-
version="0.1.49",
28+
version="1.0.49",
2929
docs_url="/",
30-
root_path=os.getenv("ROOT_PATH", "")
30+
root_path=os.getenv("ROOT_PATH", ""),
31+
separate_input_output_schemas=False,
3132
)
3233

3334
fapp.include_router(

0 commit comments

Comments
 (0)