Project

General

Profile

Bug #24586

Make NFS service bind ip use list instead of string

Added by Vaibhav Chauhan over 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

GET request for RestAPI call http://localhost:3000/api/v1.0/services/nfs/ is

 {"id": 1, "nfs_srv_16": true, "nfs_srv_allow_nonroot": true, "nfs_srv_bindip": "10.211.1.193,10.211.1.240", "nfs_srv_mountd_log": false, "nfs_srv_mountd_port": 6001, "nfs_srv_rpclockd_port": 6003, "nfs_srv_rpcstatd_port": 6002, "nfs_srv_servers": 4, "nfs_srv_statd_lockd_log": false, "nfs_srv_udp": true, "nfs_srv_v4": true, "nfs_srv_v4_krb": false, "nfs_srv_v4_v3owner": false}

I was thinking if we can get "nfs_srv_bindip": ["10.211.1.193, 10.211.1.240"] as now new web UI is implementing group checkboxes, which need list instead of a string.

CIFS already has something implemented like this for http://localhost:3000/api/v1.0/services/cifs/

{"cifs_SID": null, "cifs_srv_aio_enable": false, "cifs_srv_aio_rs": 4096, "cifs_srv_aio_ws": 4096, "cifs_srv_allow_execute_always": true, "cifs_srv_bindip": ["10.211.1.193", "10.211.1.240"], "cifs_srv_description": "FreeNAS Server", "cifs_srv_dirmask": "", "cifs_srv_domain_logons": true, "cifs_srv_doscharset": "CP437", "cifs_srv_filemask": "", "cifs_srv_guest": "nobody", "cifs_srv_hostlookup": true, "cifs_srv_localmaster": true, "cifs_srv_loglevel": "1", "cifs_srv_max_protocol": "SMB3", "cifs_srv_min_protocol": "", "cifs_srv_netbiosalias": "", "cifs_srv_netbiosname": "NETBIOS", "cifs_srv_netbiosname_b": null, "cifs_srv_ntlmv1_auth": false, "cifs_srv_nullpw": false, "cifs_srv_obey_pam_restrictions": true, "cifs_srv_smb_options": "", "cifs_srv_syslog": false, "cifs_srv_timeserver": true, "cifs_srv_unixcharset": "UTF-8", "cifs_srv_unixext": true, "cifs_srv_workgroup": "WORKGROUP", "cifs_srv_zeroconf": true, "id": 1}

the reason I am requesting the change as when I am trying to make change with following

PUT request:
http://localhost:3000/api/v1.0/services/nfs/

with Payload

{"nfs_srv_bindip":["10.211.1.193","10.211.1.240"],"nfs_srv_allow_nonroot":true,"nfs_srv_16":true}

I get following response

{"error_message": "'list' object has no attribute 'split'", "traceback": "Traceback (most recent call last):\n\n  File \"/usr/local/lib/python3.6/site-packages/tastypie/resources.py\", line 219, in wrapper\n    response = callback(request, *args, **kwargs)\n\n  File \"/usr/local/lib/python3.6/site-packages/tastypie/resources.py\", line 450, in dispatch_list\n    return self.dispatch('list', request, **kwargs)\n\n  File \"./freenasUI/api/utils.py\", line 247, in dispatch\n    request_type, request, *args, **kwargs\n\n  File \"/usr/local/lib/python3.6/site-packages/tastypie/resources.py\", line 482, in dispatch\n    response = method(request, **kwargs)\n\n  File \"./freenasUI/api/utils.py\", line 313, in put_list\n    return self.put_detail(request, **kwargs)\n\n  File \"./freenasUI/api/utils.py\", line 326, in put_detail\n    updated_bundle = self.obj_update(bundle=bundle, **self.remove_api_resource_names(kwargs))\n\n  File \"/usr/local/lib/python3.6/site-packages/tastypie/resources.py\", line 2236, in obj_update\n    return self.save(bundle, skip_errors=skip_errors)\n\n  File \"./freenasUI/api/utils.py\", line 392, in save\n    api_validation=True,\n\n  File \"./freenasUI/services/forms.py\", line 391, in __init__\n    if self.instance.id and self.instance.nfs_srv_bindip\n\nAttributeError: 'list' object has no attribute 'split'\n"}

Associated revisions

Revision aff71895 (diff)
Added by William Grzybowski over 1 year ago

fix(api): make NFS service bind ip use list instead of string

Ticket: #24586

Revision 6cd3a74e (diff)
Added by William Grzybowski over 1 year ago

fix(api): update nfs_srv_bindip to reflect reality

Ticket: #24586

Revision 2eb22f6c (diff)
Added by William Grzybowski about 1 year ago

fix(api): make NFS service bind ip use list instead of string

Ticket: #24586

Revision f6a24f4d (diff)
Added by William Grzybowski about 1 year ago

fix(api): update nfs_srv_bindip to reflect reality

Ticket: #24586

History

#1 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Screened
  • Priority changed from No priority to Nice to have
  • Target version set to 11.1

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Ready For Release

#3 Updated by Dru Lavigne about 1 year ago

  • Subject changed from requesting to change response values for nfs_srv_bindip field to Make NFS service bind ip use list instead of string

#4 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1 to 11.1-BETA1

#5 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready For Release to Resolved

#6 Updated by Joe Maloney 12 months ago

  • Needs QA changed from Yes to No
  • QA Status deleted (Not Tested)

Also available in: Atom PDF