Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit 5b359df

Browse files
author
James Sharpe
committed
Add ClusterNodeConfig and AcceleratorConfig models
1 parent 0e59db3 commit 5b359df

File tree

9 files changed

+498
-6
lines changed

9 files changed

+498
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,14 @@ Class | Method | HTTP request | Description
124124

125125
## Documentation For Models
126126

127+
- [AcceleratorConfig](docs/AcceleratorConfig.md)
127128
- [AnsysLicense](docs/AnsysLicense.md)
128129
- [BatchApplicationDetails](docs/BatchApplicationDetails.md)
129130
- [BatchApplicationList](docs/BatchApplicationList.md)
130131
- [BatchApplicationVersionDetails](docs/BatchApplicationVersionDetails.md)
131132
- [BatchQueueDetails](docs/BatchQueueDetails.md)
132133
- [Budget](docs/Budget.md)
134+
- [ClusterNodeConfig](docs/ClusterNodeConfig.md)
133135
- [Cost](docs/Cost.md)
134136
- [CostThreshold](docs/CostThreshold.md)
135137
- [CurrentSpend](docs/CurrentSpend.md)

docs/AcceleratorConfig.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# AcceleratorConfig
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **str** | |
7+
**acc_class** | **str** | |
8+
**quantity** | **int** | | [optional]
9+
**description** | **str** | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/BatchQueueDetails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**reported_max_tasks** | **int** | | [optional]
1313
**sla** | [**SLA**](SLA.md) | |
1414
**maintenance_mode** | **bool** | | [optional] [readonly]
15-
**resource_config** | **str** | | [optional] [readonly]
15+
**resource_config** | [**ClusterNodeConfig**](ClusterNodeConfig.md) | |
1616

1717
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1818

docs/ClusterNodeConfig.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ClusterNodeConfig
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**accelerator** | [**AcceleratorConfig**](AcceleratorConfig.md) | |
7+
**cpus** | **int** | | [optional]
8+
**cores_per_cpu** | **int** | | [optional]
9+
**threads_per_core** | **str** | | [optional] [readonly]
10+
**memory** | **int** | |
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

epiccore/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@
4040
from epiccore.exceptions import ApiAttributeError
4141
from epiccore.exceptions import ApiException
4242
# import models into sdk package
43+
from epiccore.models.accelerator_config import AcceleratorConfig
4344
from epiccore.models.ansys_license import AnsysLicense
4445
from epiccore.models.batch_application_details import BatchApplicationDetails
4546
from epiccore.models.batch_application_list import BatchApplicationList
4647
from epiccore.models.batch_application_version_details import BatchApplicationVersionDetails
4748
from epiccore.models.batch_queue_details import BatchQueueDetails
4849
from epiccore.models.budget import Budget
50+
from epiccore.models.cluster_node_config import ClusterNodeConfig
4951
from epiccore.models.cost import Cost
5052
from epiccore.models.cost_threshold import CostThreshold
5153
from epiccore.models.current_spend import CurrentSpend

epiccore/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
from __future__ import absolute_import
1616

1717
# import models into model package
18+
from epiccore.models.accelerator_config import AcceleratorConfig
1819
from epiccore.models.ansys_license import AnsysLicense
1920
from epiccore.models.batch_application_details import BatchApplicationDetails
2021
from epiccore.models.batch_application_list import BatchApplicationList
2122
from epiccore.models.batch_application_version_details import BatchApplicationVersionDetails
2223
from epiccore.models.batch_queue_details import BatchQueueDetails
2324
from epiccore.models.budget import Budget
25+
from epiccore.models.cluster_node_config import ClusterNodeConfig
2426
from epiccore.models.cost import Cost
2527
from epiccore.models.cost_threshold import CostThreshold
2628
from epiccore.models.current_spend import CurrentSpend
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# coding: utf-8
2+
3+
"""
4+
EPIC API
5+
6+
REST API for interacting with EPIC (https://epic.zenotech.com) services. <br /> Please note this API is in BETA and does not yet contain all EPIC functionality. # noqa: E501
7+
8+
The version of the OpenAPI document: v2
9+
10+
Generated by: https://openapi-generator.tech
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from epiccore.configuration import Configuration
20+
21+
22+
class AcceleratorConfig(object):
23+
"""NOTE: This class is auto generated by OpenAPI Generator.
24+
Ref: https://openapi-generator.tech
25+
26+
Do not edit the class manually.
27+
"""
28+
29+
"""
30+
Attributes:
31+
openapi_types (dict): The key is attribute name
32+
and the value is attribute type.
33+
attribute_map (dict): The key is attribute name
34+
and the value is json key in definition.
35+
"""
36+
openapi_types = {
37+
'name': 'str',
38+
'acc_class': 'str',
39+
'quantity': 'int',
40+
'description': 'str'
41+
}
42+
43+
attribute_map = {
44+
'name': 'name',
45+
'acc_class': 'acc_class',
46+
'quantity': 'quantity',
47+
'description': 'description'
48+
}
49+
50+
def __init__(self, name=None, acc_class=None, quantity=None, description=None, local_vars_configuration=None): # noqa: E501
51+
"""AcceleratorConfig - a model defined in OpenAPI""" # noqa: E501
52+
if local_vars_configuration is None:
53+
local_vars_configuration = Configuration()
54+
self.local_vars_configuration = local_vars_configuration
55+
56+
self._name = None
57+
self._acc_class = None
58+
self._quantity = None
59+
self._description = None
60+
self.discriminator = None
61+
62+
self.name = name
63+
self.acc_class = acc_class
64+
if quantity is not None:
65+
self.quantity = quantity
66+
self.description = description
67+
68+
@property
69+
def name(self):
70+
"""Gets the name of this AcceleratorConfig. # noqa: E501
71+
72+
73+
:return: The name of this AcceleratorConfig. # noqa: E501
74+
:rtype: str
75+
"""
76+
return self._name
77+
78+
@name.setter
79+
def name(self, name):
80+
"""Sets the name of this AcceleratorConfig.
81+
82+
83+
:param name: The name of this AcceleratorConfig. # noqa: E501
84+
:type name: str
85+
"""
86+
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
87+
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
88+
if (self.local_vars_configuration.client_side_validation and
89+
name is not None and len(name) > 100):
90+
raise ValueError("Invalid value for `name`, length must be less than or equal to `100`") # noqa: E501
91+
if (self.local_vars_configuration.client_side_validation and
92+
name is not None and len(name) < 1):
93+
raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501
94+
95+
self._name = name
96+
97+
@property
98+
def acc_class(self):
99+
"""Gets the acc_class of this AcceleratorConfig. # noqa: E501
100+
101+
102+
:return: The acc_class of this AcceleratorConfig. # noqa: E501
103+
:rtype: str
104+
"""
105+
return self._acc_class
106+
107+
@acc_class.setter
108+
def acc_class(self, acc_class):
109+
"""Sets the acc_class of this AcceleratorConfig.
110+
111+
112+
:param acc_class: The acc_class of this AcceleratorConfig. # noqa: E501
113+
:type acc_class: str
114+
"""
115+
if self.local_vars_configuration.client_side_validation and acc_class is None: # noqa: E501
116+
raise ValueError("Invalid value for `acc_class`, must not be `None`") # noqa: E501
117+
if (self.local_vars_configuration.client_side_validation and
118+
acc_class is not None and len(acc_class) > 100):
119+
raise ValueError("Invalid value for `acc_class`, length must be less than or equal to `100`") # noqa: E501
120+
if (self.local_vars_configuration.client_side_validation and
121+
acc_class is not None and len(acc_class) < 1):
122+
raise ValueError("Invalid value for `acc_class`, length must be greater than or equal to `1`") # noqa: E501
123+
124+
self._acc_class = acc_class
125+
126+
@property
127+
def quantity(self):
128+
"""Gets the quantity of this AcceleratorConfig. # noqa: E501
129+
130+
131+
:return: The quantity of this AcceleratorConfig. # noqa: E501
132+
:rtype: int
133+
"""
134+
return self._quantity
135+
136+
@quantity.setter
137+
def quantity(self, quantity):
138+
"""Sets the quantity of this AcceleratorConfig.
139+
140+
141+
:param quantity: The quantity of this AcceleratorConfig. # noqa: E501
142+
:type quantity: int
143+
"""
144+
if (self.local_vars_configuration.client_side_validation and
145+
quantity is not None and quantity > 2147483647): # noqa: E501
146+
raise ValueError("Invalid value for `quantity`, must be a value less than or equal to `2147483647`") # noqa: E501
147+
if (self.local_vars_configuration.client_side_validation and
148+
quantity is not None and quantity < -2147483648): # noqa: E501
149+
raise ValueError("Invalid value for `quantity`, must be a value greater than or equal to `-2147483648`") # noqa: E501
150+
151+
self._quantity = quantity
152+
153+
@property
154+
def description(self):
155+
"""Gets the description of this AcceleratorConfig. # noqa: E501
156+
157+
158+
:return: The description of this AcceleratorConfig. # noqa: E501
159+
:rtype: str
160+
"""
161+
return self._description
162+
163+
@description.setter
164+
def description(self, description):
165+
"""Sets the description of this AcceleratorConfig.
166+
167+
168+
:param description: The description of this AcceleratorConfig. # noqa: E501
169+
:type description: str
170+
"""
171+
if (self.local_vars_configuration.client_side_validation and
172+
description is not None and len(description) > 255):
173+
raise ValueError("Invalid value for `description`, length must be less than or equal to `255`") # noqa: E501
174+
175+
self._description = description
176+
177+
def to_dict(self):
178+
"""Returns the model properties as a dict"""
179+
result = {}
180+
181+
for attr, _ in six.iteritems(self.openapi_types):
182+
value = getattr(self, attr)
183+
if isinstance(value, list):
184+
result[attr] = list(map(
185+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
186+
value
187+
))
188+
elif hasattr(value, "to_dict"):
189+
result[attr] = value.to_dict()
190+
elif isinstance(value, dict):
191+
result[attr] = dict(map(
192+
lambda item: (item[0], item[1].to_dict())
193+
if hasattr(item[1], "to_dict") else item,
194+
value.items()
195+
))
196+
else:
197+
result[attr] = value
198+
199+
return result
200+
201+
def to_str(self):
202+
"""Returns the string representation of the model"""
203+
return pprint.pformat(self.to_dict())
204+
205+
def __repr__(self):
206+
"""For `print` and `pprint`"""
207+
return self.to_str()
208+
209+
def __eq__(self, other):
210+
"""Returns true if both objects are equal"""
211+
if not isinstance(other, AcceleratorConfig):
212+
return False
213+
214+
return self.to_dict() == other.to_dict()
215+
216+
def __ne__(self, other):
217+
"""Returns true if both objects are not equal"""
218+
if not isinstance(other, AcceleratorConfig):
219+
return True
220+
221+
return self.to_dict() != other.to_dict()

epiccore/models/batch_queue_details.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BatchQueueDetails(object):
4343
'reported_max_tasks': 'int',
4444
'sla': 'SLA',
4545
'maintenance_mode': 'bool',
46-
'resource_config': 'str'
46+
'resource_config': 'ClusterNodeConfig'
4747
}
4848

4949
attribute_map = {
@@ -91,8 +91,7 @@ def __init__(self, id=None, display_name=None, display_description=None, max_run
9191
self.sla = sla
9292
if maintenance_mode is not None:
9393
self.maintenance_mode = maintenance_mode
94-
if resource_config is not None:
95-
self.resource_config = resource_config
94+
self.resource_config = resource_config
9695

9796
@property
9897
def id(self):
@@ -324,7 +323,7 @@ def resource_config(self):
324323
325324
326325
:return: The resource_config of this BatchQueueDetails. # noqa: E501
327-
:rtype: str
326+
:rtype: ClusterNodeConfig
328327
"""
329328
return self._resource_config
330329

@@ -334,8 +333,10 @@ def resource_config(self, resource_config):
334333
335334
336335
:param resource_config: The resource_config of this BatchQueueDetails. # noqa: E501
337-
:type resource_config: str
336+
:type resource_config: ClusterNodeConfig
338337
"""
338+
if self.local_vars_configuration.client_side_validation and resource_config is None: # noqa: E501
339+
raise ValueError("Invalid value for `resource_config`, must not be `None`") # noqa: E501
339340

340341
self._resource_config = resource_config
341342

0 commit comments

Comments
 (0)