lockss-pyclient 0.1.0.dev2__py3-none-any.whl → 0.1.0.dev3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. lockss/pyclient/__init__.py +8 -29
  2. lockss/pyclient/__main__.py +37 -0
  3. lockss/pyclient/_internal_common.py +395 -0
  4. lockss/pyclient/_internal_config.py +207 -0
  5. lockss/pyclient/_internal_crawler.py +251 -0
  6. lockss/pyclient/_internal_md.py +111 -0
  7. lockss/pyclient/_internal_poller.py +174 -0
  8. lockss/pyclient/_internal_rs.py +232 -0
  9. lockss/pyclient/cli.py +839 -0
  10. lockss/pyclient/config/__init__.py +15 -0
  11. lockss/pyclient/config/api/aus_api.py +14 -6
  12. lockss/pyclient/config/api/config_api.py +12 -12
  13. lockss/pyclient/config/api/utils_api.py +2 -2
  14. lockss/pyclient/config/configuration.py +1 -1
  15. lockss/pyclient/config/models/__init__.py +15 -0
  16. lockss/pyclient/config/models/access_type.py +90 -0
  17. lockss/pyclient/config/models/au_agreements.py +136 -0
  18. lockss/pyclient/config/models/au_config_page_info.py +140 -0
  19. lockss/pyclient/config/models/au_state_bean.py +942 -0
  20. lockss/pyclient/config/models/au_status.py +837 -8
  21. lockss/pyclient/config/models/au_suspect_url_versions.py +136 -0
  22. lockss/pyclient/config/models/check_substance_result.py +6 -22
  23. lockss/pyclient/config/models/dated_peer_id_set_impl.py +162 -0
  24. lockss/pyclient/config/models/hash_result.py +136 -0
  25. lockss/pyclient/config/models/page_info.py +226 -0
  26. lockss/pyclient/config/models/peer_agreement.py +188 -0
  27. lockss/pyclient/config/models/peer_agreements.py +136 -0
  28. lockss/pyclient/config/models/platform_configuration_ws_result.py +421 -8
  29. lockss/pyclient/config/models/platform_configuration_ws_result_daemon_version.py +188 -0
  30. lockss/pyclient/config/models/platform_configuration_ws_result_java_version.py +188 -0
  31. lockss/pyclient/config/models/platform_configuration_ws_result_platform.py +162 -0
  32. lockss/pyclient/config/models/substance_checker_state.py +91 -0
  33. lockss/pyclient/config/models/suspect_url_version.py +214 -0
  34. lockss/pyclient/config/swagger.yaml +2031 -0
  35. lockss/pyclient/crawler/__init__.py +1 -0
  36. lockss/pyclient/crawler/api/crawls_api.py +2 -2
  37. lockss/pyclient/crawler/configuration.py +1 -1
  38. lockss/pyclient/crawler/models/__init__.py +1 -0
  39. lockss/pyclient/crawler/models/crawl_desc.py +4 -12
  40. lockss/pyclient/crawler/models/crawl_kind_enum.py +90 -0
  41. lockss/pyclient/crawler/models/page_info.py +22 -24
  42. lockss/pyclient/crawler/swagger.yaml +1197 -0
  43. lockss/pyclient/md/configuration.py +1 -1
  44. lockss/pyclient/md/models/page_info.py +22 -24
  45. lockss/pyclient/md/swagger.yaml +583 -0
  46. lockss/pyclient/output.py +131 -0
  47. lockss/pyclient/poller/__init__.py +11 -5
  48. lockss/pyclient/poller/api/export_api.py +5 -5
  49. lockss/pyclient/poller/api/hash_api.py +3 -3
  50. lockss/pyclient/poller/api/poll_detail_api.py +42 -42
  51. lockss/pyclient/poller/api/poller_polls_api.py +18 -18
  52. lockss/pyclient/poller/api/service_api.py +2 -2
  53. lockss/pyclient/poller/api/voter_polls_api.py +18 -18
  54. lockss/pyclient/poller/configuration.py +1 -1
  55. lockss/pyclient/poller/models/__init__.py +11 -5
  56. lockss/pyclient/poller/models/export_file_type_enum.py +93 -0
  57. lockss/pyclient/poller/models/export_filename_translation_enum.py +91 -0
  58. lockss/pyclient/poller/models/page_info.py +226 -0
  59. lockss/pyclient/poller/models/poll_desc.py +3 -11
  60. lockss/pyclient/poller/models/poll_variant_enum.py +92 -0
  61. lockss/pyclient/poller/models/poller_page_info.py +140 -0
  62. lockss/pyclient/poller/models/repair_page_info.py +140 -0
  63. lockss/pyclient/poller/models/repair_type_enum.py +91 -0
  64. lockss/pyclient/poller/models/tally_type_enum.py +93 -0
  65. lockss/pyclient/poller/models/url_page_info.py +140 -0
  66. lockss/pyclient/poller/models/voter_page_info.py +140 -0
  67. lockss/pyclient/poller/models/voter_urls_enum.py +92 -0
  68. lockss/pyclient/poller/swagger.yaml +1658 -0
  69. lockss/pyclient/rs/__init__.py +6 -0
  70. lockss/pyclient/rs/api/artifacts_api.py +20 -20
  71. lockss/pyclient/rs/api/aus_api.py +5 -5
  72. lockss/pyclient/rs/api/repo_api.py +4 -4
  73. lockss/pyclient/rs/api/status_api.py +1 -1
  74. lockss/pyclient/rs/api/wayback_api.py +12 -12
  75. lockss/pyclient/rs/configuration.py +8 -1
  76. lockss/pyclient/rs/models/__init__.py +6 -0
  77. lockss/pyclient/rs/models/artifact.py +111 -81
  78. lockss/pyclient/rs/models/au_size.py +6 -0
  79. lockss/pyclient/rs/models/auid_page_info.py +2 -2
  80. lockss/pyclient/rs/models/bulk_au_op_enum.py +90 -0
  81. lockss/pyclient/rs/models/include_content_enum.py +91 -0
  82. lockss/pyclient/rs/models/page_info.py +26 -29
  83. lockss/pyclient/rs/models/pywb_match_enum.py +93 -0
  84. lockss/pyclient/rs/models/pywb_output_enum.py +90 -0
  85. lockss/pyclient/rs/models/pywb_sort_enum.py +91 -0
  86. lockss/pyclient/rs/models/storage_info.py +131 -80
  87. lockss/pyclient/rs/models/versions_enum.py +90 -0
  88. lockss/pyclient/rs/swagger.yaml +1306 -0
  89. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/METADATA +10 -3
  90. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/RECORD +93 -45
  91. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/WHEEL +1 -1
  92. lockss_pyclient-0.1.0.dev3.dist-info/entry_points.txt +3 -0
  93. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info/licenses}/LICENSE +0 -0
@@ -30,40 +30,55 @@ class StorageInfo(object):
30
30
  swagger_types = {
31
31
  'type': 'str',
32
32
  'name': 'str',
33
- 'size': 'int',
34
- 'used': 'int',
35
- 'avail': 'int',
36
- 'percent_used_string': 'str',
37
- 'percent_used': 'float'
33
+ 'path': 'str',
34
+ 'components': 'list[StorageInfo]',
35
+ 'size_kb': 'int',
36
+ 'used_kb': 'int',
37
+ 'avail_kb': 'int',
38
+ 'percent_used': 'float',
39
+ 'percent_used_string': 'str'
38
40
  }
39
41
 
40
42
  attribute_map = {
41
43
  'type': 'type',
42
44
  'name': 'name',
43
- 'size': 'size',
44
- 'used': 'used',
45
- 'avail': 'avail',
46
- 'percent_used_string': 'percentUsedString',
47
- 'percent_used': 'percentUsed'
45
+ 'path': 'path',
46
+ 'components': 'components',
47
+ 'size_kb': 'sizeKB',
48
+ 'used_kb': 'usedKB',
49
+ 'avail_kb': 'availKB',
50
+ 'percent_used': 'percentUsed',
51
+ 'percent_used_string': 'percentUsedString'
48
52
  }
49
53
 
50
- def __init__(self, type=None, name=None, size=None, used=None, avail=None, percent_used_string=None, percent_used=None): # noqa: E501
54
+ def __init__(self, type=None, name=None, path=None, components=None, size_kb=None, used_kb=None, avail_kb=None, percent_used=None, percent_used_string=None): # noqa: E501
51
55
  """StorageInfo - a model defined in Swagger""" # noqa: E501
52
56
  self._type = None
53
57
  self._name = None
54
- self._size = None
55
- self._used = None
56
- self._avail = None
57
- self._percent_used_string = None
58
+ self._path = None
59
+ self._components = None
60
+ self._size_kb = None
61
+ self._used_kb = None
62
+ self._avail_kb = None
58
63
  self._percent_used = None
64
+ self._percent_used_string = None
59
65
  self.discriminator = None
60
66
  self.type = type
61
67
  self.name = name
62
- self.size = size
63
- self.used = used
64
- self.avail = avail
65
- self.percent_used_string = percent_used_string
66
- self.percent_used = percent_used
68
+ if path is not None:
69
+ self.path = path
70
+ if components is not None:
71
+ self.components = components
72
+ if size_kb is not None:
73
+ self.size_kb = size_kb
74
+ if used_kb is not None:
75
+ self.used_kb = used_kb
76
+ if avail_kb is not None:
77
+ self.avail_kb = avail_kb
78
+ if percent_used is not None:
79
+ self.percent_used = percent_used
80
+ if percent_used_string is not None:
81
+ self.percent_used_string = percent_used_string
67
82
 
68
83
  @property
69
84
  def type(self):
@@ -116,110 +131,125 @@ class StorageInfo(object):
116
131
  self._name = name
117
132
 
118
133
  @property
119
- def size(self):
120
- """Gets the size of this StorageInfo. # noqa: E501
134
+ def path(self):
135
+ """Gets the path of this StorageInfo. # noqa: E501
121
136
 
122
- Size in bytes of the storage area # noqa: E501
137
+ Path, if applicable # noqa: E501
123
138
 
124
- :return: The size of this StorageInfo. # noqa: E501
125
- :rtype: int
139
+ :return: The path of this StorageInfo. # noqa: E501
140
+ :rtype: str
126
141
  """
127
- return self._size
142
+ return self._path
128
143
 
129
- @size.setter
130
- def size(self, size):
131
- """Sets the size of this StorageInfo.
144
+ @path.setter
145
+ def path(self, path):
146
+ """Sets the path of this StorageInfo.
132
147
 
133
- Size in bytes of the storage area # noqa: E501
148
+ Path, if applicable # noqa: E501
134
149
 
135
- :param size: The size of this StorageInfo. # noqa: E501
136
- :type: int
150
+ :param path: The path of this StorageInfo. # noqa: E501
151
+ :type: str
137
152
  """
138
- if size is None:
139
- raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
140
153
 
141
- self._size = size
154
+ self._path = path
142
155
 
143
156
  @property
144
- def used(self):
145
- """Gets the used of this StorageInfo. # noqa: E501
157
+ def components(self):
158
+ """Gets the components of this StorageInfo. # noqa: E501
159
+
160
+ Storage areas that comprise this one # noqa: E501
161
+
162
+ :return: The components of this StorageInfo. # noqa: E501
163
+ :rtype: list[StorageInfo]
164
+ """
165
+ return self._components
166
+
167
+ @components.setter
168
+ def components(self, components):
169
+ """Sets the components of this StorageInfo.
170
+
171
+ Storage areas that comprise this one # noqa: E501
172
+
173
+ :param components: The components of this StorageInfo. # noqa: E501
174
+ :type: list[StorageInfo]
175
+ """
146
176
 
147
- Used size in bytes of the storage area # noqa: E501
177
+ self._components = components
148
178
 
149
- :return: The used of this StorageInfo. # noqa: E501
179
+ @property
180
+ def size_kb(self):
181
+ """Gets the size_kb of this StorageInfo. # noqa: E501
182
+
183
+ Size of the storage area (in KB) # noqa: E501
184
+
185
+ :return: The size_kb of this StorageInfo. # noqa: E501
150
186
  :rtype: int
151
187
  """
152
- return self._used
188
+ return self._size_kb
153
189
 
154
- @used.setter
155
- def used(self, used):
156
- """Sets the used of this StorageInfo.
190
+ @size_kb.setter
191
+ def size_kb(self, size_kb):
192
+ """Sets the size_kb of this StorageInfo.
157
193
 
158
- Used size in bytes of the storage area # noqa: E501
194
+ Size of the storage area (in KB) # noqa: E501
159
195
 
160
- :param used: The used of this StorageInfo. # noqa: E501
196
+ :param size_kb: The size_kb of this StorageInfo. # noqa: E501
161
197
  :type: int
162
198
  """
163
- if used is None:
164
- raise ValueError("Invalid value for `used`, must not be `None`") # noqa: E501
165
199
 
166
- self._used = used
200
+ self._size_kb = size_kb
167
201
 
168
202
  @property
169
- def avail(self):
170
- """Gets the avail of this StorageInfo. # noqa: E501
203
+ def used_kb(self):
204
+ """Gets the used_kb of this StorageInfo. # noqa: E501
171
205
 
172
- Available size in bytes of the storage area # noqa: E501
206
+ Size of the used storage area (in KB) # noqa: E501
173
207
 
174
- :return: The avail of this StorageInfo. # noqa: E501
208
+ :return: The used_kb of this StorageInfo. # noqa: E501
175
209
  :rtype: int
176
210
  """
177
- return self._avail
211
+ return self._used_kb
178
212
 
179
- @avail.setter
180
- def avail(self, avail):
181
- """Sets the avail of this StorageInfo.
213
+ @used_kb.setter
214
+ def used_kb(self, used_kb):
215
+ """Sets the used_kb of this StorageInfo.
182
216
 
183
- Available size in bytes of the storage area # noqa: E501
217
+ Size of the used storage area (in KB) # noqa: E501
184
218
 
185
- :param avail: The avail of this StorageInfo. # noqa: E501
219
+ :param used_kb: The used_kb of this StorageInfo. # noqa: E501
186
220
  :type: int
187
221
  """
188
- if avail is None:
189
- raise ValueError("Invalid value for `avail`, must not be `None`") # noqa: E501
190
222
 
191
- self._avail = avail
223
+ self._used_kb = used_kb
192
224
 
193
225
  @property
194
- def percent_used_string(self):
195
- """Gets the percent_used_string of this StorageInfo. # noqa: E501
226
+ def avail_kb(self):
227
+ """Gets the avail_kb of this StorageInfo. # noqa: E501
196
228
 
197
- Percentage of size used, formatted as a string # noqa: E501
229
+ Size of the available storage area (in KB) # noqa: E501
198
230
 
199
- :return: The percent_used_string of this StorageInfo. # noqa: E501
200
- :rtype: str
231
+ :return: The avail_kb of this StorageInfo. # noqa: E501
232
+ :rtype: int
201
233
  """
202
- return self._percent_used_string
234
+ return self._avail_kb
203
235
 
204
- @percent_used_string.setter
205
- def percent_used_string(self, percent_used_string):
206
- """Sets the percent_used_string of this StorageInfo.
236
+ @avail_kb.setter
237
+ def avail_kb(self, avail_kb):
238
+ """Sets the avail_kb of this StorageInfo.
207
239
 
208
- Percentage of size used, formatted as a string # noqa: E501
240
+ Size of the available storage area (in KB) # noqa: E501
209
241
 
210
- :param percent_used_string: The percent_used_string of this StorageInfo. # noqa: E501
211
- :type: str
242
+ :param avail_kb: The avail_kb of this StorageInfo. # noqa: E501
243
+ :type: int
212
244
  """
213
- if percent_used_string is None:
214
- raise ValueError("Invalid value for `percent_used_string`, must not be `None`") # noqa: E501
215
245
 
216
- self._percent_used_string = percent_used_string
246
+ self._avail_kb = avail_kb
217
247
 
218
248
  @property
219
249
  def percent_used(self):
220
250
  """Gets the percent_used of this StorageInfo. # noqa: E501
221
251
 
222
- Percentage of size used # noqa: E501
252
+ Percentage of the storage area used # noqa: E501
223
253
 
224
254
  :return: The percent_used of this StorageInfo. # noqa: E501
225
255
  :rtype: float
@@ -230,16 +260,37 @@ class StorageInfo(object):
230
260
  def percent_used(self, percent_used):
231
261
  """Sets the percent_used of this StorageInfo.
232
262
 
233
- Percentage of size used # noqa: E501
263
+ Percentage of the storage area used # noqa: E501
234
264
 
235
265
  :param percent_used: The percent_used of this StorageInfo. # noqa: E501
236
266
  :type: float
237
267
  """
238
- if percent_used is None:
239
- raise ValueError("Invalid value for `percent_used`, must not be `None`") # noqa: E501
240
268
 
241
269
  self._percent_used = percent_used
242
270
 
271
+ @property
272
+ def percent_used_string(self):
273
+ """Gets the percent_used_string of this StorageInfo. # noqa: E501
274
+
275
+ Percentage of the storage area used, formatted as a string # noqa: E501
276
+
277
+ :return: The percent_used_string of this StorageInfo. # noqa: E501
278
+ :rtype: str
279
+ """
280
+ return self._percent_used_string
281
+
282
+ @percent_used_string.setter
283
+ def percent_used_string(self, percent_used_string):
284
+ """Sets the percent_used_string of this StorageInfo.
285
+
286
+ Percentage of the storage area used, formatted as a string # noqa: E501
287
+
288
+ :param percent_used_string: The percent_used_string of this StorageInfo. # noqa: E501
289
+ :type: str
290
+ """
291
+
292
+ self._percent_used_string = percent_used_string
293
+
243
294
  def to_dict(self):
244
295
  """Returns the model properties as a dict"""
245
296
  result = {}
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Repository Service REST API
5
+
6
+ REST API of the LOCKSS Repository Service # noqa: E501
7
+
8
+ OpenAPI spec version: 2.0.0
9
+ Contact: lockss-support@lockss.org
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ """
12
+
13
+ import pprint
14
+ import re # noqa: F401
15
+
16
+ import six
17
+
18
+ class VersionsEnum(object):
19
+ """NOTE: This class is auto generated by the swagger code generator program.
20
+
21
+ Do not edit the class manually.
22
+ """
23
+
24
+ """
25
+ allowed enum values
26
+ """
27
+ ALL = "all"
28
+ LATEST = "latest"
29
+ """
30
+ Attributes:
31
+ swagger_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
+ swagger_types = {
37
+ }
38
+
39
+ attribute_map = {
40
+ }
41
+
42
+ def __init__(self): # noqa: E501
43
+ """VersionsEnum - a model defined in Swagger""" # noqa: E501
44
+ self.discriminator = None
45
+
46
+ def to_dict(self):
47
+ """Returns the model properties as a dict"""
48
+ result = {}
49
+
50
+ for attr, _ in six.iteritems(self.swagger_types):
51
+ value = getattr(self, attr)
52
+ if isinstance(value, list):
53
+ result[attr] = list(map(
54
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
55
+ value
56
+ ))
57
+ elif hasattr(value, "to_dict"):
58
+ result[attr] = value.to_dict()
59
+ elif isinstance(value, dict):
60
+ result[attr] = dict(map(
61
+ lambda item: (item[0], item[1].to_dict())
62
+ if hasattr(item[1], "to_dict") else item,
63
+ value.items()
64
+ ))
65
+ else:
66
+ result[attr] = value
67
+ if issubclass(VersionsEnum, dict):
68
+ for key, value in self.items():
69
+ result[key] = value
70
+
71
+ return result
72
+
73
+ def to_str(self):
74
+ """Returns the string representation of the model"""
75
+ return pprint.pformat(self.to_dict())
76
+
77
+ def __repr__(self):
78
+ """For `print` and `pprint`"""
79
+ return self.to_str()
80
+
81
+ def __eq__(self, other):
82
+ """Returns true if both objects are equal"""
83
+ if not isinstance(other, VersionsEnum):
84
+ return False
85
+
86
+ return self.__dict__ == other.__dict__
87
+
88
+ def __ne__(self, other):
89
+ """Returns true if both objects are not equal"""
90
+ return not self == other