Start a Conversation

Unsolved

Closed

JK

1 Rookie

 • 

17 Posts

381

March 31st, 2023 10:00

smart Quata with thresholds details Error While using API

Hi Team ,

I am trying to create a smart Quata with thresholds details , but got error

"msg": "Get Quota Details for ******** failed with { errors : [ { code : AEC_NOT_FOUND , message : Path not found '********' } ] } "

"path": "/ifs/myserver/MA",

when i checked with manually , i have "172.0.1.2:/ifs/myserver" already exist

===============================
main.yml
===============================

- name: "Create A Quota On 172.0.1.2 / myserver"
ansible.builtin.uri:
url: "https://172.0.1.2:8080/platform/1/quota/quotas"
user: "user"
password: "password"
method: POST
force_basic_auth: true
validate_certs: false
body_format: json
body: "{ { lookup('ansible.builtin.file', '{ { role_path }}/files/quota_details.json') }}"
status_code:
- 200
- 201
- 202
register: created_quota_details

 

 

 

================================================
{ { role_path }}/files/quota_details.json
================================================
{
"container": true,
"enforced": true,
"force": true,
"include_snapshots": false,
"path": "/ifs/myserver/MA",
"persona": null,
"thresholds": {
"advisory": 33500744908,
"hard": 41875931136,
"soft": 37688338022,
"soft_grace": 604800
},
"thresholds_include_overhead": true,
"type": "directory"
}

1 Rookie

 • 

79 Posts

April 5th, 2023 04:00

Hi @Javed Khan Siddque ,

Instead of uri module, have you tried using the smartquota module from the dell powerscale collection for the usecase?

The collection can be installed as below

ansible-galaxy collection install dellemc.powerscale

Sharing a sample smartquota playbook below

- name : Create a Quota for a Directory
  smartquota :
      onefs_host : " { {onefs_host}} "
      verify_ssl : " { {verify_ssl}} "
      api_user : " { {api_user}} "
      api_password : " { {api_password}} "
      path : " { {path}} "
      quota_type : " { {dir_quota_type}} "
      access_zone : " { {access_zone}} "
      quota :
        include_snapshots : False
        thresholds_on : " fs_logical_size "
        advisory_limit_size : 3
        soft_limit_size : 5
        soft_grace_period : 5
        period_unit : ' weeks '
        hard_limit_size : 6
        cap_unit : ' GB '
        container : " { {container}} "
      state : " present "
 
More examples can be found using : ansible-doc dellemc.powerscale.smartquota
Please do let me of any additional information.
 
Thanks,
Jennifer

1 Rookie

 • 

17 Posts

April 20th, 2023 09:00

Hi @jennifer_john ,


Thanks For the response.

I can able to create Quota  Over Powerscale Cluster.
with API --- YES
smartQuota MOdule --- YES

No Events found!

Top