-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of NetAPP SDK calls and functionalty for the DB On Demand use case #6
Comments
Each section maps to the high level methods of our internal ZAPI call module. |
Snapshot related functionalityI'm writing the SDK calls in a direct Python translation of the original Perl SDK calls, assuming the interface would be the same or similar ... snap_createNaElement.invoke('snapshot-create', 'volume', volume_name, 'snapshot', snapshot_name) snap_prepareThis method should be integrated in the creation action and actually transparent to the end-user. The objective is to check whether or not it is possible to create a new snapshot depending on the maximum number of snapshots permitted for a volume (254) and if the answer is negative snap_deleteNaElement.invoke('snapshot-delete', 'volume', volume_name, 'snapshot', snapshot_name) snap_restoreNaElement.invoke('snapshot-restore-volume', 'volume', volume_name, 'snapshot', snapshot_name) snap_listbuf = NaElement.invoke('snapshot-list-info', 'volume', volume_name, 'snapshot', snapshot_name) snapshot_list = buf.child_get('snapshots') for snapshot in snapshot_list:
snapshot.child_get_int('access-time', 0)
snapshot.child_get_int('cumulative-total', 0)
snapshot.child_get_string(busy')
snapshot.child_get_string('dependency') snap_clonenae = NaElement.new('volume-clone-create')
nae.child_add_string('junction-active', 'true')
nae.child_add_string('junction-path', newjunction)
nae.child_add_string('parent-snapshot', snapshot)
nae.child_add_string('parent-volume', volume)
nae.child_add_string('volume', new_volume)
NaServer.invoke_elem(nae) |
The following functionality is currently not implemented as part of the DB On Demand framework, but exploited through external projects (DFM) and should be made available through the API. I will group them as vol_createCreates a volume. The current implementation allows for profiles or packs, where volumes for a specific type of a database can be requested requiring a certain size for the data volume and the size of the WAL logs volume will be computed accordingly to the database size. That functionality should vol_restrictRestrict access to the volume prior to supervised deletion vol_break_locksRemoves locks on volume vol_infoGets volume information such as filer ip address, mounting path, etc. |
ACL modification functionalityThis is not currently available anywhere. It would be useful to be able to add/remove hosts from the ACL definitions |
@AlbinS Do you need additional information to get going? |
@icot I think I'm good for now, but I'm certain more questions will pop up as I go. The ACL bit might need a bit of clarification, but I'd say that's probably not part of a minimal implementation, but rather a future extension, given that you don't even need it right now. Baby steps! Also, authentication -- we spoke about not using SSO, but if not -- what should we be using in stead? Also, should/must there be granular access control, or is this a case of "access to the API -> access to everything"? |
@icot Ok, so the API uses volume names and snapshot names to identify a snapshot. Is that what we want to be using in the API as well? Also, what types of forms do they take -- arbitrary strings, paths, ...? |
The ACL is truly the least priority item on the list yes. Regarding authentication, in the end it is a matter of how much you want to implement access control at the API level versus how much you can delegate to the filers. What I mean by this is the following:
Regarding volume and snapshot names, AFAIK both can be arbitrary strings |
Hi guys, just to comment, the ACL functionality is implemented in the RulesREST.py endpoint. If you refer by that to the possibility to add/remove IPs to an existing access policy. The creation is part of the vol create. I put it there and not as a added functionality of the RulesREST because a policy should be always part of a volume or set of volumes. |
What @gasparuben mentioned is exactly what we need. |
I would prefer not to use IDs, as that would probably require the API to keep an internal mapping of id->resources, and that is unnecessary added complexity if it can be avoided. That said, I'm leaning more and more towards keeping the existing authentication implementation for the API itself. SSO may be messy and inconvenient for client/server applications, but hopefully I should be able to provide a nice Python wrapper (and a Perl one already exists, right?), so most pain points should be covered. |
Speaking of IDs, @gasparuben, what was the reason behind the desicion to base64-encode resources/arguments? |
I will mention both the SDK object/method used and the context in which they are used currently (middle level methods as currently used in the current version of the code).
The currently used version of the Netapp SDK is 5.3.1
The text was updated successfully, but these errors were encountered: