Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

unable to increase hard quotas #20

Open

Description

@newbee162

want to increase the hard quotas , but can't seem to get it right. I am able to update "enforced"

api_instance = isi_sdk_8_2_1.QuotaApi(isi_sdk_8_2_1.ApiClient(configuration))
quota_api = isi_sdk_8_2_1.QuotaApi(api_client)
quota_quota_id = 'HwAHAAEAAAAAAAAAAAAAQAEAAAAAAAAA'

quota_quota = isi_sdk_8_2_1.QuotaQuotaThresholds(
hard=3221225472)

Output:
"code" : "AEC_BAD_REQUEST",
"field" : "hard",
"message" : "Field: hard has error: A property was present that is not defined by the schema."
},
{
"code" : "AEC_BAD_REQUEST",
"message" : "Input validation failed."
}

What am i doing wrong?

Activity

  1. added
    Bug_SDKBugs related to SDK and surrounding scripts
    on Apr 21, 2020
  2. vboddui commented on Apr 21, 2020

    @vboddui

    Updating hard via OneFS CLI is working fine, should be a bug in SDK.

  3. vboddui commented on Apr 24, 2020

    @vboddui
    import isi_sdk_8_2_2 as sdk
    conf = sdk.Configuration()
    
    conf.host = 'https://<onefs_node_ip>:8080'
    conf.username='root'
    conf.password='a'
    conf.verify_ssl = False
    
    client = sdk.ApiClient(conf)
    qapi = sdk.QuotaApi(client)
    resp = qapi.list_quota_quotas()
    
    print(resp.quotas[0].id)
    
    hquota = sdk.QuotaQuotaThresholds(hard=3221225472)
    print(hquota)
    qapi.update_quota_quota(hquota, resp.quotas[0].id)
    
    python  quotatest.py
    EAEGAAEAAAAAAAAAAAAAQAEAAAAAAAAA
    {'advisory': None,
     'hard': 3221225472,
     'percent_advisory': None,
     'percent_soft': None,
     'soft': None,
     'soft_grace': None}
    Traceback (most recent call last):
      File "quotatest.py", line 17, in <module>
        qapi.update_quota_quota(hquota, resp.quotas[0].id)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/api/quota_api.py", line 2317, in update_quota_quota
        (data) = self.update_quota_quota_with_http_info(quota_quota, quota_quota_id, **kwargs)  # noqa: E501
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/api/quota_api.py", line 2402, in update_quota_quota_with_http_info
        collection_formats=collection_formats)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/api_client.py", line 346, in call_api
        _preload_content, _request_timeout)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/api_client.py", line 177, in __call_api
        _request_timeout=_request_timeout)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/api_client.py", line 397, in request
        body=body)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/rest.py", line 369, in PUT
        body=body)
      File "..//isi_sdk_python/isi_sdk_8_2_2/isi_sdk_8_2_2/rest.py", line 236, in request
        raise ApiException(http_resp=r)
    isi_sdk_8_2_2.rest.ApiException: (400)
    Reason: Bad Request
    HTTP response headers: HTTPHeaderDict({'Transfer-Encoding': 'chunked', 'Strict-Transport-Security': 'max-age=31536000;', 'Server': 'Apache', 'Connection': 'close', 'Allow': 'GET, PUT, DELETE, HEAD', 'Date': 'Fri, 24 Apr 2020 09:46:42 GMT', 'X-Frame-Options': 'sameorigin', 'Content-Type': 'application/json'})
    HTTP response body:
    {
    "errors" :
    [
    
    {
    "code" : "AEC_BAD_REQUEST",
    "field" : "hard",
    "message" : "Field: hard has error: A property was present that is not defined by the schema."
    },
    
    {
    "code" : "AEC_BAD_REQUEST",
    "message" : "Input validation failed."
    }
    ]
    }
    
  4. self-assigned this
    on Apr 27, 2020
  5. dhanush03122003 commented on Jul 23, 2025

    @dhanush03122003

    @vboddui , @newbee162

    According to schema hard is at nested level which is inside of thresholds, below is the working code snippet.

    from __future__ import print_function
    import urllib3
    
    from isilon_sdk.v9_12_0 import Configuration, ApiClient, QuotaApi , QuotaQuota ,QuotaQuotaThresholds
    from isilon_sdk.v9_12_0.rest import ApiException
    
    
    urllib3.disable_warnings()
    
    configuration = Configuration()
    configuration.host = 'https://<NODE_IP>:8080'
    configuration.username = 'USER_NAME' 
    configuration.password = 'PASSWORD'  
    configuration.verify_ssl = False
    
    api_client = ApiClient(configuration)
    quota_api = QuotaApi(api_client)
    
    thresholds = QuotaQuotaThresholds(hard=3221225472)
    
    quota_quota = QuotaQuota(thresholds = thresholds)
    
    resp = quota_api.list_quota_quotas()
    
    quota_quota_id = resp.quotas[0].id
    
    try:
        api_response = quota_api.update_quota_quota(quota_quota=quota_quota , quota_quota_id = quota_quota_id)
        print(api_response)
        resp = quota_api.list_quota_quotas()
        print(resp.quotas[0].thresholds.hard)
    
    except ApiException as e:
        print(e)
    

    output:

    v-env/bin/python  /root/TEST_SDK/quota_quota_git_issue.py
    None
    3221225472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bug_SDKBugs related to SDK and surrounding scripts

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions