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
@@ -28,6 +28,7 @@ from lockss.pyclient.crawler.models.api_status import ApiStatus
28
28
  from lockss.pyclient.crawler.models.counter import Counter
29
29
  from lockss.pyclient.crawler.models.crawl_desc import CrawlDesc
30
30
  from lockss.pyclient.crawler.models.crawl_job import CrawlJob
31
+ from lockss.pyclient.crawler.models.crawl_kind_enum import CrawlKindEnum
31
32
  from lockss.pyclient.crawler.models.crawl_pager import CrawlPager
32
33
  from lockss.pyclient.crawler.models.crawl_status import CrawlStatus
33
34
  from lockss.pyclient.crawler.models.crawl_ws_result import CrawlWsResult
@@ -223,7 +223,7 @@ class CrawlsApi(object):
223
223
  auth_settings = ['basicAuth'] # noqa: E501
224
224
 
225
225
  return self.api_client.call_api(
226
- '/crawls/{jobId}/mimeType/{type}', 'GET',
226
+ '/crawls/{jobId}/mediatypes/{type}', 'GET',
227
227
  path_params,
228
228
  query_params,
229
229
  header_params,
@@ -635,7 +635,7 @@ class CrawlsApi(object):
635
635
  auth_settings = ['basicAuth'] # noqa: E501
636
636
 
637
637
  return self.api_client.call_api(
638
- '/crawls/{jobId}/notModified', 'GET',
638
+ '/crawls/{jobId}/notmodified', 'GET',
639
639
  path_params,
640
640
  query_params,
641
641
  header_params,
@@ -46,7 +46,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
46
46
  def __init__(self):
47
47
  """Constructor"""
48
48
  # Default Base url
49
- self.host = "https://laaws.lockss.org:443/"
49
+ self.host = "{proto}://{hostname}:{port}/"
50
50
  # Temp file folder for downloading files
51
51
  self.temp_folder_path = None
52
52
 
@@ -18,6 +18,7 @@ from lockss.pyclient.crawler.models.api_status import ApiStatus
18
18
  from lockss.pyclient.crawler.models.counter import Counter
19
19
  from lockss.pyclient.crawler.models.crawl_desc import CrawlDesc
20
20
  from lockss.pyclient.crawler.models.crawl_job import CrawlJob
21
+ from lockss.pyclient.crawler.models.crawl_kind_enum import CrawlKindEnum
21
22
  from lockss.pyclient.crawler.models.crawl_pager import CrawlPager
22
23
  from lockss.pyclient.crawler.models.crawl_status import CrawlStatus
23
24
  from lockss.pyclient.crawler.models.crawl_ws_result import CrawlWsResult
@@ -29,7 +29,7 @@ class CrawlDesc(object):
29
29
  """
30
30
  swagger_types = {
31
31
  'au_id': 'str',
32
- 'crawl_kind': 'str',
32
+ 'crawl_kind': 'CrawlKindEnum',
33
33
  'crawler_id': 'str',
34
34
  'force_crawl': 'bool',
35
35
  'refetch_depth': 'int',
@@ -51,7 +51,7 @@ class CrawlDesc(object):
51
51
  'extra_crawler_data': 'extraCrawlerData'
52
52
  }
53
53
 
54
- def __init__(self, au_id=None, crawl_kind=None, crawler_id='classic', force_crawl=False, refetch_depth=-1, priority=0, crawl_list=None, crawl_depth=None, extra_crawler_data=None): # noqa: E501
54
+ def __init__(self, au_id=None, crawl_kind=None, crawler_id='classic', force_crawl=False, refetch_depth=-1, priority=None, crawl_list=None, crawl_depth=None, extra_crawler_data=None): # noqa: E501
55
55
  """CrawlDesc - a model defined in Swagger""" # noqa: E501
56
56
  self._au_id = None
57
57
  self._crawl_kind = None
@@ -109,10 +109,9 @@ class CrawlDesc(object):
109
109
  def crawl_kind(self):
110
110
  """Gets the crawl_kind of this CrawlDesc. # noqa: E501
111
111
 
112
- The kind of crawl being performed either 'newContent' or 'repair'. # noqa: E501
113
112
 
114
113
  :return: The crawl_kind of this CrawlDesc. # noqa: E501
115
- :rtype: str
114
+ :rtype: CrawlKindEnum
116
115
  """
117
116
  return self._crawl_kind
118
117
 
@@ -120,19 +119,12 @@ class CrawlDesc(object):
120
119
  def crawl_kind(self, crawl_kind):
121
120
  """Sets the crawl_kind of this CrawlDesc.
122
121
 
123
- The kind of crawl being performed either 'newContent' or 'repair'. # noqa: E501
124
122
 
125
123
  :param crawl_kind: The crawl_kind of this CrawlDesc. # noqa: E501
126
- :type: str
124
+ :type: CrawlKindEnum
127
125
  """
128
126
  if crawl_kind is None:
129
127
  raise ValueError("Invalid value for `crawl_kind`, must not be `None`") # noqa: E501
130
- allowed_values = ["newContent", "repair"] # noqa: E501
131
- if crawl_kind not in allowed_values:
132
- raise ValueError(
133
- "Invalid value for `crawl_kind` ({0}), must be one of {1}" # noqa: E501
134
- .format(crawl_kind, allowed_values)
135
- )
136
128
 
137
129
  self._crawl_kind = crawl_kind
138
130
 
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Crawler Service REST API
5
+
6
+ REST API of the LOCKSS Crawler 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 CrawlKindEnum(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
+ NEWCONTENT = "newContent"
28
+ REPAIR = "repair"
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
+ """CrawlKindEnum - 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(CrawlKindEnum, 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, CrawlKindEnum):
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
@@ -29,7 +29,7 @@ class PageInfo(object):
29
29
  """
30
30
  swagger_types = {
31
31
  'total_count': 'int',
32
- 'results_per_page': 'int',
32
+ 'items_in_page': 'int',
33
33
  'continuation_token': 'str',
34
34
  'cur_link': 'str',
35
35
  'next_link': 'str'
@@ -37,23 +37,25 @@ class PageInfo(object):
37
37
 
38
38
  attribute_map = {
39
39
  'total_count': 'totalCount',
40
- 'results_per_page': 'resultsPerPage',
40
+ 'items_in_page': 'itemsInPage',
41
41
  'continuation_token': 'continuationToken',
42
42
  'cur_link': 'curLink',
43
43
  'next_link': 'nextLink'
44
44
  }
45
45
 
46
- def __init__(self, total_count=None, results_per_page=None, continuation_token=None, cur_link=None, next_link=None): # noqa: E501
46
+ def __init__(self, total_count=None, items_in_page=None, continuation_token=None, cur_link=None, next_link=None): # noqa: E501
47
47
  """PageInfo - a model defined in Swagger""" # noqa: E501
48
48
  self._total_count = None
49
- self._results_per_page = None
49
+ self._items_in_page = None
50
50
  self._continuation_token = None
51
51
  self._cur_link = None
52
52
  self._next_link = None
53
53
  self.discriminator = None
54
- self.total_count = total_count
55
- self.results_per_page = results_per_page
56
- self.continuation_token = continuation_token
54
+ if total_count is not None:
55
+ self.total_count = total_count
56
+ self.items_in_page = items_in_page
57
+ if continuation_token is not None:
58
+ self.continuation_token = continuation_token
57
59
  self.cur_link = cur_link
58
60
  if next_link is not None:
59
61
  self.next_link = next_link
@@ -78,35 +80,33 @@ class PageInfo(object):
78
80
  :param total_count: The total_count of this PageInfo. # noqa: E501
79
81
  :type: int
80
82
  """
81
- if total_count is None:
82
- raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501
83
83
 
84
84
  self._total_count = total_count
85
85
 
86
86
  @property
87
- def results_per_page(self):
88
- """Gets the results_per_page of this PageInfo. # noqa: E501
87
+ def items_in_page(self):
88
+ """Gets the items_in_page of this PageInfo. # noqa: E501
89
89
 
90
- The number of results per page. # noqa: E501
90
+ The number of items in page. # noqa: E501
91
91
 
92
- :return: The results_per_page of this PageInfo. # noqa: E501
92
+ :return: The items_in_page of this PageInfo. # noqa: E501
93
93
  :rtype: int
94
94
  """
95
- return self._results_per_page
95
+ return self._items_in_page
96
96
 
97
- @results_per_page.setter
98
- def results_per_page(self, results_per_page):
99
- """Sets the results_per_page of this PageInfo.
97
+ @items_in_page.setter
98
+ def items_in_page(self, items_in_page):
99
+ """Sets the items_in_page of this PageInfo.
100
100
 
101
- The number of results per page. # noqa: E501
101
+ The number of items in page. # noqa: E501
102
102
 
103
- :param results_per_page: The results_per_page of this PageInfo. # noqa: E501
103
+ :param items_in_page: The items_in_page of this PageInfo. # noqa: E501
104
104
  :type: int
105
105
  """
106
- if results_per_page is None:
107
- raise ValueError("Invalid value for `results_per_page`, must not be `None`") # noqa: E501
106
+ if items_in_page is None:
107
+ raise ValueError("Invalid value for `items_in_page`, must not be `None`") # noqa: E501
108
108
 
109
- self._results_per_page = results_per_page
109
+ self._items_in_page = items_in_page
110
110
 
111
111
  @property
112
112
  def continuation_token(self):
@@ -128,8 +128,6 @@ class PageInfo(object):
128
128
  :param continuation_token: The continuation_token of this PageInfo. # noqa: E501
129
129
  :type: str
130
130
  """
131
- if continuation_token is None:
132
- raise ValueError("Invalid value for `continuation_token`, must not be `None`") # noqa: E501
133
131
 
134
132
  self._continuation_token = continuation_token
135
133