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
@@ -0,0 +1,136 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Configuration Service REST API
5
+
6
+ REST API of the LOCKSS Configuration 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 AuSuspectUrlVersions(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
+ Attributes:
25
+ swagger_types (dict): The key is attribute name
26
+ and the value is attribute type.
27
+ attribute_map (dict): The key is attribute name
28
+ and the value is json key in definition.
29
+ """
30
+ swagger_types = {
31
+ 'auid': 'str',
32
+ 'suspect_versions': 'list[SuspectUrlVersion]'
33
+ }
34
+
35
+ attribute_map = {
36
+ 'auid': 'auid',
37
+ 'suspect_versions': 'suspectVersions'
38
+ }
39
+
40
+ def __init__(self, auid=None, suspect_versions=None): # noqa: E501
41
+ """AuSuspectUrlVersions - a model defined in Swagger""" # noqa: E501
42
+ self._auid = None
43
+ self._suspect_versions = None
44
+ self.discriminator = None
45
+ if auid is not None:
46
+ self.auid = auid
47
+ if suspect_versions is not None:
48
+ self.suspect_versions = suspect_versions
49
+
50
+ @property
51
+ def auid(self):
52
+ """Gets the auid of this AuSuspectUrlVersions. # noqa: E501
53
+
54
+
55
+ :return: The auid of this AuSuspectUrlVersions. # noqa: E501
56
+ :rtype: str
57
+ """
58
+ return self._auid
59
+
60
+ @auid.setter
61
+ def auid(self, auid):
62
+ """Sets the auid of this AuSuspectUrlVersions.
63
+
64
+
65
+ :param auid: The auid of this AuSuspectUrlVersions. # noqa: E501
66
+ :type: str
67
+ """
68
+
69
+ self._auid = auid
70
+
71
+ @property
72
+ def suspect_versions(self):
73
+ """Gets the suspect_versions of this AuSuspectUrlVersions. # noqa: E501
74
+
75
+
76
+ :return: The suspect_versions of this AuSuspectUrlVersions. # noqa: E501
77
+ :rtype: list[SuspectUrlVersion]
78
+ """
79
+ return self._suspect_versions
80
+
81
+ @suspect_versions.setter
82
+ def suspect_versions(self, suspect_versions):
83
+ """Sets the suspect_versions of this AuSuspectUrlVersions.
84
+
85
+
86
+ :param suspect_versions: The suspect_versions of this AuSuspectUrlVersions. # noqa: E501
87
+ :type: list[SuspectUrlVersion]
88
+ """
89
+
90
+ self._suspect_versions = suspect_versions
91
+
92
+ def to_dict(self):
93
+ """Returns the model properties as a dict"""
94
+ result = {}
95
+
96
+ for attr, _ in six.iteritems(self.swagger_types):
97
+ value = getattr(self, attr)
98
+ if isinstance(value, list):
99
+ result[attr] = list(map(
100
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
101
+ value
102
+ ))
103
+ elif hasattr(value, "to_dict"):
104
+ result[attr] = value.to_dict()
105
+ elif isinstance(value, dict):
106
+ result[attr] = dict(map(
107
+ lambda item: (item[0], item[1].to_dict())
108
+ if hasattr(item[1], "to_dict") else item,
109
+ value.items()
110
+ ))
111
+ else:
112
+ result[attr] = value
113
+ if issubclass(AuSuspectUrlVersions, dict):
114
+ for key, value in self.items():
115
+ result[key] = value
116
+
117
+ return result
118
+
119
+ def to_str(self):
120
+ """Returns the string representation of the model"""
121
+ return pprint.pformat(self.to_dict())
122
+
123
+ def __repr__(self):
124
+ """For `print` and `pprint`"""
125
+ return self.to_str()
126
+
127
+ def __eq__(self, other):
128
+ """Returns true if both objects are equal"""
129
+ if not isinstance(other, AuSuspectUrlVersions):
130
+ return False
131
+
132
+ return self.__dict__ == other.__dict__
133
+
134
+ def __ne__(self, other):
135
+ """Returns true if both objects are not equal"""
136
+ return not self == other
@@ -29,8 +29,8 @@ class CheckSubstanceResult(object):
29
29
  """
30
30
  swagger_types = {
31
31
  'id': 'str',
32
- 'old_state': 'str',
33
- 'new_state': 'str',
32
+ 'old_state': 'SubstanceCheckerState',
33
+ 'new_state': 'SubstanceCheckerState',
34
34
  'error_message': 'str'
35
35
  }
36
36
 
@@ -82,10 +82,9 @@ class CheckSubstanceResult(object):
82
82
  def old_state(self):
83
83
  """Gets the old_state of this CheckSubstanceResult. # noqa: E501
84
84
 
85
- An indication of whether the result is successful # noqa: E501
86
85
 
87
86
  :return: The old_state of this CheckSubstanceResult. # noqa: E501
88
- :rtype: str
87
+ :rtype: SubstanceCheckerState
89
88
  """
90
89
  return self._old_state
91
90
 
@@ -93,19 +92,12 @@ class CheckSubstanceResult(object):
93
92
  def old_state(self, old_state):
94
93
  """Sets the old_state of this CheckSubstanceResult.
95
94
 
96
- An indication of whether the result is successful # noqa: E501
97
95
 
98
96
  :param old_state: The old_state of this CheckSubstanceResult. # noqa: E501
99
- :type: str
97
+ :type: SubstanceCheckerState
100
98
  """
101
99
  if old_state is None:
102
100
  raise ValueError("Invalid value for `old_state`, must not be `None`") # noqa: E501
103
- allowed_values = ["Unknown", "Yes", "No"] # noqa: E501
104
- if old_state not in allowed_values:
105
- raise ValueError(
106
- "Invalid value for `old_state` ({0}), must be one of {1}" # noqa: E501
107
- .format(old_state, allowed_values)
108
- )
109
101
 
110
102
  self._old_state = old_state
111
103
 
@@ -113,10 +105,9 @@ class CheckSubstanceResult(object):
113
105
  def new_state(self):
114
106
  """Gets the new_state of this CheckSubstanceResult. # noqa: E501
115
107
 
116
- An indication of whether the result is successful # noqa: E501
117
108
 
118
109
  :return: The new_state of this CheckSubstanceResult. # noqa: E501
119
- :rtype: str
110
+ :rtype: SubstanceCheckerState
120
111
  """
121
112
  return self._new_state
122
113
 
@@ -124,19 +115,12 @@ class CheckSubstanceResult(object):
124
115
  def new_state(self, new_state):
125
116
  """Sets the new_state of this CheckSubstanceResult.
126
117
 
127
- An indication of whether the result is successful # noqa: E501
128
118
 
129
119
  :param new_state: The new_state of this CheckSubstanceResult. # noqa: E501
130
- :type: str
120
+ :type: SubstanceCheckerState
131
121
  """
132
122
  if new_state is None:
133
123
  raise ValueError("Invalid value for `new_state`, must not be `None`") # noqa: E501
134
- allowed_values = ["Unknown", "Yes", "No"] # noqa: E501
135
- if new_state not in allowed_values:
136
- raise ValueError(
137
- "Invalid value for `new_state` ({0}), must be one of {1}" # noqa: E501
138
- .format(new_state, allowed_values)
139
- )
140
124
 
141
125
  self._new_state = new_state
142
126
 
@@ -0,0 +1,162 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Configuration Service REST API
5
+
6
+ REST API of the LOCKSS Configuration 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 DatedPeerIdSetImpl(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
+ Attributes:
25
+ swagger_types (dict): The key is attribute name
26
+ and the value is attribute type.
27
+ attribute_map (dict): The key is attribute name
28
+ and the value is json key in definition.
29
+ """
30
+ swagger_types = {
31
+ 'auid': 'str',
32
+ 'raw_set': 'list[str]',
33
+ '_date': 'int'
34
+ }
35
+
36
+ attribute_map = {
37
+ 'auid': 'auid',
38
+ 'raw_set': 'rawSet',
39
+ '_date': 'date'
40
+ }
41
+
42
+ def __init__(self, auid=None, raw_set=None, _date=None): # noqa: E501
43
+ """DatedPeerIdSetImpl - a model defined in Swagger""" # noqa: E501
44
+ self._auid = None
45
+ self._raw_set = None
46
+ self.__date = None
47
+ self.discriminator = None
48
+ if auid is not None:
49
+ self.auid = auid
50
+ if raw_set is not None:
51
+ self.raw_set = raw_set
52
+ if _date is not None:
53
+ self._date = _date
54
+
55
+ @property
56
+ def auid(self):
57
+ """Gets the auid of this DatedPeerIdSetImpl. # noqa: E501
58
+
59
+
60
+ :return: The auid of this DatedPeerIdSetImpl. # noqa: E501
61
+ :rtype: str
62
+ """
63
+ return self._auid
64
+
65
+ @auid.setter
66
+ def auid(self, auid):
67
+ """Sets the auid of this DatedPeerIdSetImpl.
68
+
69
+
70
+ :param auid: The auid of this DatedPeerIdSetImpl. # noqa: E501
71
+ :type: str
72
+ """
73
+
74
+ self._auid = auid
75
+
76
+ @property
77
+ def raw_set(self):
78
+ """Gets the raw_set of this DatedPeerIdSetImpl. # noqa: E501
79
+
80
+
81
+ :return: The raw_set of this DatedPeerIdSetImpl. # noqa: E501
82
+ :rtype: list[str]
83
+ """
84
+ return self._raw_set
85
+
86
+ @raw_set.setter
87
+ def raw_set(self, raw_set):
88
+ """Sets the raw_set of this DatedPeerIdSetImpl.
89
+
90
+
91
+ :param raw_set: The raw_set of this DatedPeerIdSetImpl. # noqa: E501
92
+ :type: list[str]
93
+ """
94
+
95
+ self._raw_set = raw_set
96
+
97
+ @property
98
+ def _date(self):
99
+ """Gets the _date of this DatedPeerIdSetImpl. # noqa: E501
100
+
101
+
102
+ :return: The _date of this DatedPeerIdSetImpl. # noqa: E501
103
+ :rtype: int
104
+ """
105
+ return self.__date
106
+
107
+ @_date.setter
108
+ def _date(self, _date):
109
+ """Sets the _date of this DatedPeerIdSetImpl.
110
+
111
+
112
+ :param _date: The _date of this DatedPeerIdSetImpl. # noqa: E501
113
+ :type: int
114
+ """
115
+
116
+ self.__date = _date
117
+
118
+ def to_dict(self):
119
+ """Returns the model properties as a dict"""
120
+ result = {}
121
+
122
+ for attr, _ in six.iteritems(self.swagger_types):
123
+ value = getattr(self, attr)
124
+ if isinstance(value, list):
125
+ result[attr] = list(map(
126
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
127
+ value
128
+ ))
129
+ elif hasattr(value, "to_dict"):
130
+ result[attr] = value.to_dict()
131
+ elif isinstance(value, dict):
132
+ result[attr] = dict(map(
133
+ lambda item: (item[0], item[1].to_dict())
134
+ if hasattr(item[1], "to_dict") else item,
135
+ value.items()
136
+ ))
137
+ else:
138
+ result[attr] = value
139
+ if issubclass(DatedPeerIdSetImpl, dict):
140
+ for key, value in self.items():
141
+ result[key] = value
142
+
143
+ return result
144
+
145
+ def to_str(self):
146
+ """Returns the string representation of the model"""
147
+ return pprint.pformat(self.to_dict())
148
+
149
+ def __repr__(self):
150
+ """For `print` and `pprint`"""
151
+ return self.to_str()
152
+
153
+ def __eq__(self, other):
154
+ """Returns true if both objects are equal"""
155
+ if not isinstance(other, DatedPeerIdSetImpl):
156
+ return False
157
+
158
+ return self.__dict__ == other.__dict__
159
+
160
+ def __ne__(self, other):
161
+ """Returns true if both objects are not equal"""
162
+ return not self == other
@@ -0,0 +1,136 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Configuration Service REST API
5
+
6
+ REST API of the LOCKSS Configuration 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 HashResult(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
+ Attributes:
25
+ swagger_types (dict): The key is attribute name
26
+ and the value is attribute type.
27
+ attribute_map (dict): The key is attribute name
28
+ and the value is json key in definition.
29
+ """
30
+ swagger_types = {
31
+ 'bytes': 'str',
32
+ 'algorithm': 'str'
33
+ }
34
+
35
+ attribute_map = {
36
+ 'bytes': 'bytes',
37
+ 'algorithm': 'algorithm'
38
+ }
39
+
40
+ def __init__(self, bytes=None, algorithm=None): # noqa: E501
41
+ """HashResult - a model defined in Swagger""" # noqa: E501
42
+ self._bytes = None
43
+ self._algorithm = None
44
+ self.discriminator = None
45
+ if bytes is not None:
46
+ self.bytes = bytes
47
+ if algorithm is not None:
48
+ self.algorithm = algorithm
49
+
50
+ @property
51
+ def bytes(self):
52
+ """Gets the bytes of this HashResult. # noqa: E501
53
+
54
+
55
+ :return: The bytes of this HashResult. # noqa: E501
56
+ :rtype: str
57
+ """
58
+ return self._bytes
59
+
60
+ @bytes.setter
61
+ def bytes(self, bytes):
62
+ """Sets the bytes of this HashResult.
63
+
64
+
65
+ :param bytes: The bytes of this HashResult. # noqa: E501
66
+ :type: str
67
+ """
68
+
69
+ self._bytes = bytes
70
+
71
+ @property
72
+ def algorithm(self):
73
+ """Gets the algorithm of this HashResult. # noqa: E501
74
+
75
+
76
+ :return: The algorithm of this HashResult. # noqa: E501
77
+ :rtype: str
78
+ """
79
+ return self._algorithm
80
+
81
+ @algorithm.setter
82
+ def algorithm(self, algorithm):
83
+ """Sets the algorithm of this HashResult.
84
+
85
+
86
+ :param algorithm: The algorithm of this HashResult. # noqa: E501
87
+ :type: str
88
+ """
89
+
90
+ self._algorithm = algorithm
91
+
92
+ def to_dict(self):
93
+ """Returns the model properties as a dict"""
94
+ result = {}
95
+
96
+ for attr, _ in six.iteritems(self.swagger_types):
97
+ value = getattr(self, attr)
98
+ if isinstance(value, list):
99
+ result[attr] = list(map(
100
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
101
+ value
102
+ ))
103
+ elif hasattr(value, "to_dict"):
104
+ result[attr] = value.to_dict()
105
+ elif isinstance(value, dict):
106
+ result[attr] = dict(map(
107
+ lambda item: (item[0], item[1].to_dict())
108
+ if hasattr(item[1], "to_dict") else item,
109
+ value.items()
110
+ ))
111
+ else:
112
+ result[attr] = value
113
+ if issubclass(HashResult, dict):
114
+ for key, value in self.items():
115
+ result[key] = value
116
+
117
+ return result
118
+
119
+ def to_str(self):
120
+ """Returns the string representation of the model"""
121
+ return pprint.pformat(self.to_dict())
122
+
123
+ def __repr__(self):
124
+ """For `print` and `pprint`"""
125
+ return self.to_str()
126
+
127
+ def __eq__(self, other):
128
+ """Returns true if both objects are equal"""
129
+ if not isinstance(other, HashResult):
130
+ return False
131
+
132
+ return self.__dict__ == other.__dict__
133
+
134
+ def __ne__(self, other):
135
+ """Returns true if both objects are not equal"""
136
+ return not self == other