Subscribe

how to create user on many FAS system using SDK?

I want to create one user. Do you know if this SDK can help and how ? 

 

Thanks,

Re: how to create user on many FAS system using SDK?

You can utilize PowerShell for this easy enough. Assuming clustered Data ONTAP you'll use:

 


NAME
New-NcUser

SYNOPSIS
Create a new user account associated with the specified application and authentication method.


SYNTAX
New-NcUser [-UserName] <String> -Vserver <String[]> -Application <String[]> [-AuthMethod <String>] -Role <String> [-Password <String>] [-Comment <String>]
[-Controller <NcController[]>] [-ZapiRetryCount <Int32>] [<CommonParameters>]

New-NcUser -Vserver <String[]> -Application <String[]> [-AuthMethod <String>] -Role <String> [-Credential <PSCredential>] [-Comment <String>] [-Controller
<NcController[]>] [-ZapiRetryCount <Int32>] [<CommonParameters>]

Re: how to create user on many FAS system using SDK?

i am using linux as the adminhost. do you have a python language script for this?

Re: how to create user on many FAS system using SDK?

I have not used the NetApp Manageability SDK extentesively but I just ran through the documentation and did not see anything in regards to creating new users. However, someone else may be able to point us in the right direction.

 

One alternative I can suggest is a Python script that I put together that automates the process of SSH'ing into a controller and entering a set of commands. You can find the relevant code on the DatacenterDudes GitHub repo. I purposely left the code generic as possible so you'll have to tweak it a bit for your sepcific use case. If you do decide to go this route and run into problems I'm more than willing to help add the relvant functionality to the code.

Re: how to create user on many FAS system using SDK?

This looks like a good start....

 

security_login_create

[Family: cluster]

Create a new user account associated the specified application and authentication method.

 

That's from the cmode API docs...

 

 

--rdp

Re: how to create user on many FAS system using SDK?

I havnet found the documentation to be too useful but maybe I'm looking in the wrong spot. Can you provide a link to the document youre looking at?

Re: how to create user on many FAS system using SDK?

That is from the API docs that are in the SDK download. There are two files in there that I use as reference:

 

netapp-manageability-sdk-5.2.1/doc/perldoc/OntapClusterAPI.html

netapp-manageability-sdk-5.2.1/doc/perldoc/Ontap7ModeAPI.html

 

Even though they are under the 'perldoc' area they are just HTML files with the API calls and data types. Since they are under the perldoc area they're all represented at Perl calls, so for example the perl function nfs_exportfs_list_rules_2 just translates to the nfs-exportfs-list-rules-2 API call (sub - for _ etc..).

 

Hope that helps.

 

--rdp

Re: how to create user on many FAS system using SDK?

A lot more detailed than what I was focused on (SDK_Help.html). I just didnt dig deep enough. Thanks!