Skip to content

Commit

Permalink
Merge pull request #108 from oracle/toxophilist/sprint-10
Browse files Browse the repository at this point in the history
Fix Service Gateway only offers all services when drawn but then prov…
  • Loading branch information
toxophilist authored Sep 17, 2020
2 parents 80be3ba + 583773f commit 76b1367
Show file tree
Hide file tree
Showing 13 changed files with 650 additions and 184 deletions.
15 changes: 13 additions & 2 deletions okitweb/okitOci.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from facades.ociRouteTable import OCIRouteTables
from facades.ociSecurityList import OCISecurityLists
from facades.ociServiceGateway import OCIServiceGateways
from facades.ociServices import OCIServices
from facades.ociShape import OCIShapes
from facades.ociSubnet import OCISubnets
from facades.ociTenancy import OCITenancies
Expand Down Expand Up @@ -295,14 +296,24 @@ def ociArtifacts(artifact):
def dropdownQuery():
if request.method == 'GET':
dropdown_json = {}
# Regions
oci_regions = OCIRegions()
dropdown_json["regions"] = sorted(oci_regions.list(), key=lambda k: k['name'])
# Services
oci_services = OCIServices()
dropdown_json["services"] = sorted(oci_services.list(), key=lambda k: k['name'])
# Instance Shapes
oci_shapes = OCIShapes()
dropdown_json["shapes"] = sorted(oci_shapes.list(), key=lambda k: k['sort_key'])
oci_images = OCIImages()
dropdown_json["images"] = sorted(oci_images.list(), key=lambda k: k['sort_key'])
# Database System Shapes
db_system_shapes = OCIDatabaseSystemShapes()
dropdown_json["db_system_shapes"] = sorted(db_system_shapes.list(), key=lambda k: k['shape'])
# Database Versions
db_versions = OCIDatabaseVersions()
dropdown_json["db_versions"] = sorted(db_versions.list(), key=lambda k: k['version'])
oci_images = OCIImages()
dropdown_json["images"] = sorted(oci_images.list(), key=lambda k: k['sort_key'])
# Instance Images
return dropdown_json
else:
return 'Unknown Method', 500
Expand Down
Loading

0 comments on commit 76b1367

Please sign in to comment.