Software Development Kit (SDK) and API Discussions

cifs-share-acl-list-iter-start & Vfiler Tunneling

DWAYNECAMP
4,612 Views

Hi Guys,

I am able to use cifs-share-acl-list-iter-start on a filer level. However when I try to use  with vfiler tunneling I get the following error below:

unable to find API: cifs-share-acl-list-iter-start for vfiler vfiler_name

Looking on the docs cifs-share-acl-list-iter-start does not seem to support vfiler tunneling, however cifs-share-acl-list-iter-next and cifs-share-acl-list-iter-end seem to support vfiler tunneling. (This might just be documentation)

Has anyone used the above API's before ?

Testing filers with Ontap Version  7.3.5

--

Dwayne

1 ACCEPTED SOLUTION

rle
NetApp Alumni
4,610 Views

Hi Dwayne -

You have hit burt 443207, http://support.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=443207, which is not public.  It is not fixed until 8.2.    The documentation comes directly from the internal API specification, so cifs-share-acl-list-iter-start is not vfFiler supported.  Regards,

   - Rick -

View solution in original post

5 REPLIES 5

rle
NetApp Alumni
4,611 Views

Hi Dwayne -

You have hit burt 443207, http://support.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=443207, which is not public.  It is not fixed until 8.2.    The documentation comes directly from the internal API specification, so cifs-share-acl-list-iter-start is not vfFiler supported.  Regards,

   - Rick -

DWAYNECAMP
4,610 Views

Rick,

Thank you for the reply Rick. Been wondering what is wrong with my code.

How do I mark this question as answered ?

rle
NetApp Alumni
4,610 Views

Dwayne,

See if you can find "Mark this answer as correct" at the bottom of the post where there is like and reply button.

   - Rick -

mirko
4,611 Views

Just posting a little work-around I created in case you really need to parse the ACL's.

################################

$controller = "10.0.0.1"

$vfiler = "myVfiler"

# connect to the vfiler

Connect-NaController $controller -vfiler $vfiler

# get the list of the shares (this command is not affected by the burt)

$shares = Get-NaCifsShare

# container for the result

$global:aclList = @()

# because of the burt, we get the ACL info through CLI instead

$command = "vfiler run $vfiler cifs shares"

Invoke-NaSsh -Command $command -WarningVariable warningMsg -OutVariable outMsg -ErrorVariable errorMsg 2>&1 | Out-Null

function parseCifsSharesOutput($output){

    $acls = @()

    $tempshare = ""

   

    # parse the lines

    $lines = $output.Split("`n")

    foreach($line in $lines){

        # if were are past the "----" lines, we can can start parsing

        if($infostarted){

            # it the line is start with a "tab", it's an acl

            if($line.StartsWith("`t")){

                # ACL found

                $line = $line.Trim()

                $acl = $line.Split("/")

                if($acl.Count -eq 2){

                    $newacl = "" | Select ShareName,MountPoint,Description,User,Permission

                    $newacl.ShareName = $tempshare.ShareName

                    $newacl.MountPoint = $tempshare.Mountpoint

                    $newacl.Description = $tempshare.Description

                    $newacl.User = $acl[0].Trim()

                    $newacl.Permission = $acl[1].Trim()

                    $acls += $newacl

                }

            # if the line does not start with "tab", it is a new share entry

            }else{

                # new share found

                $line = $line.Trim()

                # ignore blank lines (normally at the end)

                if($line -ne ""){

                    $share = $line -split "\s+/"

                    $tempshare = $shares | where{$_.ShareName -eq $share[0].Trim()}

                }

            }

        }

       

        # we ignore all lines until we come accross "----"

        if($line.StartsWith("----")){

            $infostarted = $true

        }

    }

    $global:aclList = $acls

}

if(-not $warningMsg -and -not $errorMsg){

    parseCifsSharesOutput $outMsg

    $global:aclList | ft

}else{

    write-output "Warning : $warningMsg"

    write-output "Error : $errorMsg"

}

ohnemus
3,913 Views
Mirko - How does this handle share paths with spaces in the volume names?
Public