Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Is there an ONTAP SDK interface to change a qtree's security style?
2012-02-16
10:04 AM
7,033 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Am I missing something, or is there no means to change a qtree's security style in the Manageability SDK version 4.1 ONTAP APIs? I'm looking for an API equivalent to "qtree security" on the CLI.
Thanks,
Andy
Solved! See The Solution
1 ACCEPTED SOLUTION
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no 7-mode API to change qtree security. You will have to use the system-cli API. See https://communities.netapp.com/message/3072#3072 for an example.
Regards,
- Rick -
4 REPLIES 4
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no 7-mode API to change qtree security. You will have to use the system-cli API. See https://communities.netapp.com/message/3072#3072 for an example.
Regards,
- Rick -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does system-cli still exist in version 4.1? I'm not seeing it in the Docs...
Thanks,
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andy -
It is undocumented. That is why I pointed you to the example. There is also a code example in the SDK. I suggest writing a small standalone Perl script or C or Java program and call "qtree security".
Here is some documentation:
system-cli | [top] |
An interface to the CLI.
Input Name Range Type Description args arg[] The arguments of the command line. priv string
optionalPriviledge level, e.g. "admin" or "advanced". Output Name Range Type Description cli-output string All output (including error messages) from the command. cli-result-value integer The result value of the command execution (as in CLI 'result'). Possible Values: 0 (command could not be executed), 1 (command executed, but may have errors). Data ONTAP 6.4 and earlier returned 255 if the command executed.
Vfiler-enabled |
Yes |
Element definition: arg | [top] |
The individual arguments of a command |
[none]
Regards,
- Rick -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the benefit of anyone who comes across this discussion later, here's the way I did this in Python, possibly useful as an example:
def invoke_cli(self, *cli_args):
"""
Call the unsupported/undocumented system-cli API.
cli_args, joined with spaces, would represent the command line
if executing in the CLI.
Return the NaElement result of executing the command.
"""
args = NaElement('args')
for arg in cli_args:
args.child_add(NaElement('arg', arg))
cli = NaElement('system-cli')
cli.child_add(args)
out = self.api.invoke_elem(cli)
if out.results_status() == 'failed':
raise OntapApiException(out.results_errno(), out.results_reason())
return out
"self.api" is simply an NaServer instance; OntapApiException is an exception I use to handle errors that would be shown in out.results_status().
-Andy
