-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from fabric-testbed/adv-res
Adv reservation support
- Loading branch information
Showing
17 changed files
with
443 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Metrics | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**results** | **list[object]** | | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# swagger_client.MetricsApi | ||
|
||
All URIs are relative to *http://127.0.0.1:8700/* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**metrics_overview_get**](MetricsApi.md#metrics_overview_get) | **GET** /metrics/overview | Control Framework metrics overview | ||
|
||
# **metrics_overview_get** | ||
> Metrics metrics_overview_get(excluded_projects=excluded_projects) | ||
Control Framework metrics overview | ||
|
||
Control Framework metrics overview | ||
|
||
### Example | ||
```python | ||
from __future__ import print_function | ||
import time | ||
import swagger_client | ||
from swagger_client.rest import ApiException | ||
from pprint import pprint | ||
|
||
# create an instance of the API class | ||
api_instance = swagger_client.MetricsApi() | ||
excluded_projects = ['excluded_projects_example'] # list[str] | List of projects to exclude from the metrics overview (optional) | ||
|
||
try: | ||
# Control Framework metrics overview | ||
api_response = api_instance.metrics_overview_get(excluded_projects=excluded_projects) | ||
pprint(api_response) | ||
except ApiException as e: | ||
print("Exception when calling MetricsApi->metrics_overview_get: %s\n" % e) | ||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**excluded_projects** | [**list[str]**](str.md)| List of projects to exclude from the metrics overview | [optional] | ||
|
||
### Return type | ||
|
||
[**Metrics**](Metrics.md) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: application/json | ||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.7.0b1" | ||
__version__ = "1.7.0b8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
fabric_cf/orchestrator/swagger_client/api/metrics_api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
Fabric Orchestrator API | ||
This is Fabric Orchestrator API # noqa: E501 | ||
OpenAPI spec version: 1.0.1 | ||
Contact: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
""" | ||
|
||
from __future__ import absolute_import | ||
|
||
import re # noqa: F401 | ||
|
||
# python 2 and python 3 compatibility library | ||
import six | ||
|
||
from fabric_cf.orchestrator.swagger_client.api_client import ApiClient | ||
|
||
|
||
class MetricsApi(object): | ||
"""NOTE: This class is auto generated by the swagger code generator program. | ||
Do not edit the class manually. | ||
Ref: https://github.com/swagger-api/swagger-codegen | ||
""" | ||
|
||
def __init__(self, api_client=None): | ||
if api_client is None: | ||
api_client = ApiClient() | ||
self.api_client = api_client | ||
|
||
def metrics_overview_get(self, **kwargs): # noqa: E501 | ||
"""Control Framework metrics overview # noqa: E501 | ||
Control Framework metrics overview # noqa: E501 | ||
This method makes a synchronous HTTP request by default. To make an | ||
asynchronous HTTP request, please pass async_req=True | ||
>>> thread = api.metrics_overview_get(async_req=True) | ||
>>> result = thread.get() | ||
:param async_req bool | ||
:param list[str] excluded_projects: List of projects to exclude from the metrics overview | ||
:return: Metrics | ||
If the method is called asynchronously, | ||
returns the request thread. | ||
""" | ||
kwargs = {key: value for key, value in kwargs.items() if value is not None} | ||
kwargs['_return_http_data_only'] = True | ||
if kwargs.get('async_req'): | ||
return self.metrics_overview_get_with_http_info(**kwargs) # noqa: E501 | ||
else: | ||
(data) = self.metrics_overview_get_with_http_info(**kwargs) # noqa: E501 | ||
return data | ||
|
||
def metrics_overview_get_with_http_info(self, **kwargs): # noqa: E501 | ||
"""Control Framework metrics overview # noqa: E501 | ||
Control Framework metrics overview # noqa: E501 | ||
This method makes a synchronous HTTP request by default. To make an | ||
asynchronous HTTP request, please pass async_req=True | ||
>>> thread = api.metrics_overview_get_with_http_info(async_req=True) | ||
>>> result = thread.get() | ||
:param async_req bool | ||
:param list[str] excluded_projects: List of projects to exclude from the metrics overview | ||
:return: Metrics | ||
If the method is called asynchronously, | ||
returns the request thread. | ||
""" | ||
|
||
all_params = ['excluded_projects'] # noqa: E501 | ||
all_params.append('async_req') | ||
all_params.append('_return_http_data_only') | ||
all_params.append('_preload_content') | ||
all_params.append('_request_timeout') | ||
|
||
params = locals() | ||
for key, val in six.iteritems(params['kwargs']): | ||
if key not in all_params: | ||
raise TypeError( | ||
"Got an unexpected keyword argument '%s'" | ||
" to method metrics_overview_get" % key | ||
) | ||
params[key] = val | ||
del params['kwargs'] | ||
|
||
collection_formats = {} | ||
|
||
path_params = {} | ||
|
||
query_params = [] | ||
if 'excluded_projects' in params: | ||
query_params.append(('excluded_projects', params['excluded_projects'])) # noqa: E501 | ||
collection_formats['excluded_projects'] = 'multi' # noqa: E501 | ||
|
||
header_params = {} | ||
|
||
form_params = [] | ||
local_var_files = {} | ||
|
||
body_params = None | ||
# HTTP header `Accept` | ||
header_params['Accept'] = self.api_client.select_header_accept( | ||
['application/json']) # noqa: E501 | ||
|
||
# Authentication setting | ||
auth_settings = [] # noqa: E501 | ||
|
||
return self.api_client.call_api( | ||
'/metrics/overview', 'GET', | ||
path_params, | ||
query_params, | ||
header_params, | ||
body=body_params, | ||
post_params=form_params, | ||
files=local_var_files, | ||
response_type='Metrics', # noqa: E501 | ||
auth_settings=auth_settings, | ||
async_req=params.get('async_req'), | ||
_return_http_data_only=params.get('_return_http_data_only'), | ||
_preload_content=params.get('_preload_content', True), | ||
_request_timeout=params.get('_request_timeout'), | ||
collection_formats=collection_formats) |
Oops, something went wrong.