NexentaStor.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
   <ViewDefinitions>
      <View>
         <Name>NsControllerTable</Name>
         <ViewSelectedBy>
            <TypeName>Ns.Controller</TypeName>
         </ViewSelectedBy>
         <TableControl>
            <!-- ################ TABLE DEFINITIONS ################ -->
            <TableHeaders>
               <TableColumnHeader>
                  <Label>Name</Label>
                  <Width>40</Width>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>Port</Label>
                  <Width>4</Width>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>User</Label>
                  <Width>15</Width>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
               <TableRowEntry>
                  <TableColumnItems>
                     <TableColumnItem>
                        <PropertyName>Name</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>Port</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>User</PropertyName>
                     </TableColumnItem>
                  </TableColumnItems>
               </TableRowEntry>
            </TableRowEntries>
         </TableControl>
      </View>
      <View>
         <Name>NsPoolTable</Name>
         <ViewSelectedBy>
            <TypeName>Ns.Pool</TypeName>
         </ViewSelectedBy>
         <TableControl>
            <!-- ################ TABLE DEFINITIONS ################ -->
            <TableHeaders>
               <TableColumnHeader>
                  <Label>poolName</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>health</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>size</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>allocated</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>availableSpace</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
               <TableRowEntry>
                  <TableColumnItems>
                     <TableColumnItem>
                        <PropertyName>poolName</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>health</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.size) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.allocated) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>spaceUsed</PropertyName>
                     </TableColumnItem>
                  </TableColumnItems>
               </TableRowEntry>
            </TableRowEntries>
         </TableControl>
      </View>
      <View>
         <Name>NsFilesystemTable</Name>
         <ViewSelectedBy>
            <TypeName>Ns.Filesystem</TypeName>
         </ViewSelectedBy>
         <TableControl>
            <!-- ################ TABLE DEFINITIONS ################ -->
            <TableHeaders>
               <TableColumnHeader>
                  <Label>name</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>path</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>Available</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>LogicalUsed</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>ActualUsed</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>UsedBySnapshots</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
               <TableColumnHeader>
                  <Label>quotaSize</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
                <TableColumnHeader>
                  <Label>compressionRatio</Label>
                  <Alignment>left</Alignment>
               </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
               <TableRowEntry>
                  <TableColumnItems>
                     <TableColumnItem>
                        <PropertyName>name</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>path</PropertyName>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.bytesAvailable) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.bytesLogicalUsed) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.bytesUsed) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.bytesUsedBySnapshots) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <ScriptBlock>switch($_.quotaSize) {
                                   { $_ -gt 1tb }
                                          { "{0:n2} Tb" -f ($_ / 1tb);break }
                                   { $_ -gt 1gb }
                                          { "{0:n2} Gb" -f ($_ / 1gb);break }
                                   { $_ -gt 1mb }
                                          { "{0:n2} Mb " -f ($_ / 1mb);break }
                                   { $_ -gt 1kb }
                                          { "{0:n2} Kb " -f ($_ / 1Kb);break }
                                   default
                                          { "{0} B " -f $_}
                                 }</ScriptBlock>
                     </TableColumnItem>
                     <TableColumnItem>
                        <PropertyName>compressionRatio</PropertyName>
                     </TableColumnItem>
                  </TableColumnItems>
               </TableRowEntry>
            </TableRowEntries>
         </TableControl>
      </View>
 
 <View>
         <Name>NsNfsShare</Name>
         <ViewSelectedBy>
            <TypeName>Ns.NfsShare</TypeName>
         </ViewSelectedBy>
<ListControl>
    <ListEntries>
      <ListEntry>
        <ListItems>
<ListItem><PropertyName>anon</PropertyName></ListItem>
<ListItem><PropertyName>filesystem</PropertyName></ListItem>
<ListItem><PropertyName>mountPoint</PropertyName></ListItem>
<ListItem><PropertyName>nohide</PropertyName></ListItem>
<ListItem><PropertyName>securityContexts</PropertyName></ListItem>
<ListItem><PropertyName>shareState</PropertyName></ListItem>
        </ListItems>
      </ListEntry>
    </ListEntries>
  </ListControl>
 
      </View>
 
   </ViewDefinitions>
</Configuration>
<!--$bob[0] | Get-Member -MemberType NoteProperty | % {write-host "<ListItem><PropertyName>$($_.Name)</PropertyName></ListItem>"} -->