Skip to content

Commit f466a64

Browse files
authored
Add state to index description response (#46)
* Add state to index description response * Bump version to 2.0.9 * Update proto specs and docs
1 parent e15081e commit f466a64

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

pinecone/__version__

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.8
1+
2.0.9

pinecone/core/client/model/index_meta_database_status.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def openapi_types():
8787
"""
8888
return {
8989
'ready': (bool,), # noqa: E501
90+
'state': (str,), # noqa: E501
9091
}
9192

9293
@cached_property
@@ -96,6 +97,7 @@ def discriminator():
9697

9798
attribute_map = {
9899
'ready': 'ready', # noqa: E501
100+
'state': 'state', # noqa: E501
99101
}
100102

101103
read_only_vars = {
@@ -140,6 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
140142
through its discriminator because we passed in
141143
_visited_composed_classes = (Animal,)
142144
ready (bool): [optional] # noqa: E501
145+
state (str): [optional] # noqa: E501
143146
"""
144147

145148
_check_type = kwargs.pop('_check_type', True)
@@ -222,6 +225,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
222225
through its discriminator because we passed in
223226
_visited_composed_classes = (Animal,)
224227
ready (bool): [optional] # noqa: E501
228+
state (str): [optional] # noqa: E501
225229
"""
226230

227231
_check_type = kwargs.pop('_check_type', True)

pinecone/manage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ def describe_index(name: str):
177177
response = api_instance.describe_index(name)
178178
db = response['database']
179179
ready = response['status']['ready']
180+
state = response['status']['state']
180181
return IndexDescription(name=db['name'], index_type=db['index_type'], metric=db['metric'],
181182
replicas=db['replicas'], dimension=db['dimension'], shards=db['shards'],
182183
pods=db.get('pods', db['shards']*db['replicas']), pod_type=db.get('pod_type', 'p1'),
183-
index_config=db['index_config'], status={'ready': ready})
184+
index_config=db['index_config'], status={'ready': ready, 'state': state})
184185

185186

186187
def scale_index(name: str, replicas: int):

specs/index_service.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@
322322
"properties": {
323323
"ready": {
324324
"type": "boolean"
325+
},
326+
"state": {
327+
"type": "string"
325328
}
326329
}
327330
}

specs/pinecone_api.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@
990990
"properties": {
991991
"ready": {
992992
"type": "boolean"
993+
},
994+
"state": {
995+
"type": "string"
993996
}
994997
}
995998
}

0 commit comments

Comments
 (0)