@@ -34,6 +34,7 @@ class AquaUIHandler(AquaAPIhandler):
3434 HTTPError: For various failure scenarios such as invalid input format, missing data, etc.
3535 """
3636
37+ @handle_exceptions
3738 def get (self , id = "" ):
3839 """Handle GET request."""
3940 url_parse = urlparse (self .request .path )
@@ -76,30 +77,25 @@ def delete(self, id=""):
7677 else :
7778 raise HTTPError (400 , f"The request { self .request .path } is invalid." )
7879
79- @handle_exceptions
8080 def list_log_groups (self , ** kwargs ):
8181 """Lists all log groups for the specified compartment or tenancy."""
8282 compartment_id = self .get_argument ("compartment_id" , default = COMPARTMENT_OCID )
8383 return self .finish (
8484 AquaUIApp ().list_log_groups (compartment_id = compartment_id , ** kwargs )
8585 )
8686
87- @handle_exceptions
8887 def list_logs (self , log_group_id : str , ** kwargs ):
8988 """Lists the specified log group's log objects."""
9089 return self .finish (AquaUIApp ().list_logs (log_group_id = log_group_id , ** kwargs ))
9190
92- @handle_exceptions
9391 def list_compartments (self ):
9492 """Lists the compartments in a compartment specified by ODSC_MODEL_COMPARTMENT_OCID env variable."""
9593 return self .finish (AquaUIApp ().list_compartments ())
9694
97- @handle_exceptions
9895 def get_default_compartment (self ):
9996 """Returns user compartment ocid."""
10097 return self .finish (AquaUIApp ().get_default_compartment ())
10198
102- @handle_exceptions
10399 def list_model_version_sets (self , ** kwargs ):
104100 """Lists all model version sets for the specified compartment or tenancy."""
105101
@@ -112,7 +108,6 @@ def list_model_version_sets(self, **kwargs):
112108 )
113109 )
114110
115- @handle_exceptions
116111 def list_experiments (self , ** kwargs ):
117112 """Lists all experiments for the specified compartment or tenancy."""
118113
@@ -125,7 +120,6 @@ def list_experiments(self, **kwargs):
125120 )
126121 )
127122
128- @handle_exceptions
129123 def list_buckets (self , ** kwargs ):
130124 """Lists all model version sets for the specified compartment or tenancy."""
131125 compartment_id = self .get_argument ("compartment_id" , default = COMPARTMENT_OCID )
@@ -138,23 +132,20 @@ def list_buckets(self, **kwargs):
138132 )
139133 )
140134
141- @handle_exceptions
142135 def list_job_shapes (self , ** kwargs ):
143136 """Lists job shapes available in the specified compartment."""
144137 compartment_id = self .get_argument ("compartment_id" , default = COMPARTMENT_OCID )
145138 return self .finish (
146139 AquaUIApp ().list_job_shapes (compartment_id = compartment_id , ** kwargs )
147140 )
148141
149- @handle_exceptions
150142 def list_vcn (self , ** kwargs ):
151143 """Lists the virtual cloud networks (VCNs) in the specified compartment."""
152144 compartment_id = self .get_argument ("compartment_id" , default = COMPARTMENT_OCID )
153145 return self .finish (
154146 AquaUIApp ().list_vcn (compartment_id = compartment_id , ** kwargs )
155147 )
156148
157- @handle_exceptions
158149 def list_subnets (self , ** kwargs ):
159150 """Lists the subnets in the specified VCN and the specified compartment."""
160151 compartment_id = self .get_argument ("compartment_id" , default = COMPARTMENT_OCID )
@@ -165,7 +156,6 @@ def list_subnets(self, **kwargs):
165156 )
166157 )
167158
168- @handle_exceptions
169159 def get_shape_availability (self , ** kwargs ):
170160 """For a given compartmentId, resource limit name, and scope, returns the number of available resources associated
171161 with the given limit."""
@@ -178,7 +168,6 @@ def get_shape_availability(self, **kwargs):
178168 )
179169 )
180170
181- @handle_exceptions
182171 def is_bucket_versioned (self ):
183172 """For a given compartmentId, resource limit name, and scope, returns the number of available resources associated
184173 with the given limit."""
0 commit comments