NetApp Solidfire CLI Command Line Reference

 

Note that this CLI guide is meant to be a short “cheat sheet” reference to the Solidfire CLI.  For complete details on the options for each command you’ll want to log in to NetApp’s support site and review their latest CLI guide.

If you want to control your Solidfire array from the CLI you’ll need to install the CLI Tools before you get started.  For a Linux client, you must have Python 2.7.9+ installed first and you’ll need to set up the virtual environment.  More details are of course available in the NetApp documentation, but for a quick start you’ll want to follow the steps below.  I also found the code on Gitub here:  https://github.com/solidfire/solidfire-cli.

pip install virtualenv
virtualenv pythoncli
source pythoncli/bin/activate
pip install solidfire-cli
Go to solidfirecli*.tar.gz, and run easy_install    solidfirecli*.tar.gz.

CLI Reference

CLI Option Parameters
Option Description
-c, –connectionindex Index of connection you want to use
-j, –json Display output in JSON
-k, –pickle Display output in pickled JSON
-d, –depth Display output in tree format with specified depth
-m, –mvip Management virtual IP address for the cluster
-l, –login Login ID for the cluster
-p, –password Password for the cluster
-n, –name Name of connection you want to use
-f, –filter_tree Tree format filter, specify fields in csv list
–debug [ 0 | 1 | 2 | 3 ] Debug level
–help Display inline help
Managing Connections
Executing a command without storing it
sfcli –mvip 192.168.1.10 –login admin –password admin Account List
Storing a Connection
sfcli –mvip 192.168.1.10 –login admin –password admin –name “Sample” Connection Push
Using a Stored Connection
sfcli -n Example Account List # by name
List Stored Connections
sfcli Connection List
API Commands
sfcli SFApi invoke <method> <parameters> Invoke any API method for version & port the connection is using.
Account Commands
sfcli Account list <options> Returns the list of accounts.
sfcli Account getefficiency <options> Retrieve efficiency statistics about a volume account.
sfcli Account remove <accountid> Remove an existing account.
sfcli Account getbyname <username> Retrieve details about a specific account.
sfcli Account add <options> Add a new account to the system.
sfcli Account getbyid <accountid> Return details about a specific account, given it’s account ID.
Administrator Commands
sfcli Clusteradmin getloginbanner <options> Get the current terms of use banner shown on login.
sfcli Clusteradmin setloginbanner <options> Configure the terms of use banner.
Backup Target Commands
sfcli BackupTarget modify  <options> Change attributes of a backup target.
sfcli BackupTarget create <name> <attributes> Create and store backup target info.
sfcli BackupTarget list Retrieve info about all backup targets.
sfcli BackupTarget remove <backuptargetid> Delete backup targets.
sfcli BackupTarget get <backuptargetid> Retrieve info about a specific backup target.
Cluster Commands
sfcli Cluster getinfo Undocumented NetApp engineering command for troubleshooting.
sfcli Cluster getcompletestats Undocumented NetApp engineering command for troubleshooting.
sfcli Cluster getrawstats Undocumented NetApp engineering command for troubleshooting.
sfcli Cluster getapi Return a list of all API methods & supported API endpoints.
sfcli Cluster disablesnmp Disable SNMP on cluster nodes.
sfcli Cluster getsnmpstate Get the current SNMP State.
sfcli Cluster getsnmpinfo Retrieve the current SNMP config.
sfcli Cluster getconfig Return info about the cluster config this node uses.
sfcli Cluster createsupportbundle <options> Create a support bundle.
sfcli Cluster deleteallsupportbundles Delete all support bundles.
sfcli Cluster getsystemstatus Return whether or not a reboot is required.
sfcli Cluster setsnmptrapinfo <options> Enable/Disable SNMP Traps & specify host notifications.
sfcli Cluster listfaults  <bestpractices> <faulttypes> Retrieve info about cluster faults.
sfcli Cluster listadmins Lists cluster administrators.
sfcli Cluster create <options> Initialize the cluster node that owns the SVIP/MVIP.
sfcli Cluster enableencryptionatrest Enables AES 256bit encryption at rest on the cluster.
sfcli Cluster disableencryptionatrest Remove encryption that was previously enabled.
sfcli Cluster addadmin <options> Add a new cluster admin account.
sfcli Cluster setntpinfo <servers> <broadcastclient> Configure NTP on cluster nodes.
sfcli Cluster setconfig <cluster> Node cluster configuration.
sfcli Cluster modifyadmin <options> Change settings for the cluster or LDAP cluster admin.
sfcli Cluster getsnmptrapinfo Retrieve current SNMP Trap configuration.
sfcli Cluster listevents <options> Retrurn a list of the current cluster events.
sfcli Cluster snmpsendtesttraps Test SNMP, send test traps to the current SNMP manager.
sfcli Cluster removeadmin <clusteradminid> Remove a cluster admin.
sfcli Cluster modifyfullthreshold <options> Change event thresholds.
sfcli Cluster getlimits Retrieve API limit values.
sfcli Cluster getcurrentadmin Lists info for the current primary cluster admin.
sfcli Cluster getcapacity Return a high level list of cluster capacity information.
sfcli Cluster getntpinfo Shows the current NTP config.
sfcli Cluster getversioninfo Shows the current software version on each cluster node.
sfcli Cluster setsnmpacl <networks> <usmusers> Configure SNMP on cluster nodes.
sfcli Cluster clearfaults <options> Remove fault info for resolved and unresolved faults.
sfcli Cluster getsnmpacl Return SNMP access permissions.
sfcli Cluster getstate <force> Returns info regarding node’s cluster participation.
sfcli Cluster enablesnmp <snmpv3enabled> Enable SNMP on cluster nodes.
sfcli Cluster getstats Retreive cumulative high level activity for the cluster.
sfcli Cluster getmasternodeid Retreive the cluster master node ID.
sfcli Cluster setsnmpinfo <options> Configure SNMP v2/3 on cluster nodes.
sfcli Cluster getfullthreshold View the stages set for clsuter fullness levels.
sfcli Cluster listsyncjobs Return info about cluster syncronization jobs.
sfcli Cluster getsslcertificate Retrieve the active SSL certificate.
sfcli Cluster removesslcertificate Delete the user SSL certificate & private key for all cluster nodes.
sfcli Cluster setsslcertificate <options> Set a user SSL certificate & private key for the cluster nodes.
Drive Commands
sfcli Drive reset  <drives> <force> Initialize a drive & remove all data on it.
sfcli Drive secureerase  <drives> Remove residual data from drives in an available state.
sfcli Drive listdrivestats <drives> Retreive activity info for multiple cluster drives.
sfcli Drive list List of drives in active cluster nodes.
sfcli Drive remove <drives> <forceduringupgrade> Remove cluster drives.
sfcli Drive gethardwareinfo <driveid> Returns all hardware info for a specific drive.
sfcli Drive add <options> Add one or more drives to the cluster.
sfcli Drive getstats <driveid> Returns activity info for a single cluster drive.
sfcli Drive getconfig Display drive info for number of slices & block drive counts.
sfcli Drive test <minutes> Runs a hardware validation on all drives in a node.
sfcli Drive listhardware <force> Returns all of the drives connected to a cluster node.
Hardware Information Commands
sfcli Hardware getnvraminfo <force> Retrieve NVRAM info from each cluster node.
sfcli Hardware gethardwareinfo <nodeid> Retreive hardware info status for a single cluster node.
sfcli Hardware getnodeinfo <nodeid> Returns hardware status info for a single cluster node.
sfcli Hardware getclusterinfo  <type> Get hardware status for all FC & iSCSI nodes and drives in the cluster.
sfcli Hardware getconfig Display hardware configuration for a node.
Hardware Sensor Commands
sfcli Sensors getipmiinfo Display a detailed reporting of sensors/objects.
sfcli Sensors getipmiconfig <chassistype> Retreive hardware sensor info.
Initiator Commands
sfcli Initiators modify <options> Change the attributes of initiators.
sfcli Initiators create <options> Create new IQNs or WWPNs & assign them aliases.
sfcli Initiators list <options> List IQNs and WWPNs.
sfcli Initiators delete <initiators> Delete one or more initiators.
sfcli Initiators removefromvolumeaccessgroup <options> Remove initiators from a specific volume access group.
sfcli Initiators addtovolumeaccessgroup <options> Add initiators to a specific volume access group.
LDAP Commands
sfcli LDAP addclusteradmin <options> Add a new LDAP cluster admin user.
sfcli LDAP getconfiguration Get the currently active LDAP cluster config.
sfcli LDAP testauthentication <options> Validate the currently enabled LDAP authentication settings.
sfcli LDAP disableauthentication Disable LDAP authentication & remove LDAP configuration.
sfcli LDAP enableauthentication <options> Configure an LDAP connection to a cluster.
Logging Session Commands
sfcli LoggingSession getremotelogginghosts Retreive the current list of log servers.
sfcli LoggingSession setremotelogginghosts <hosts> Configure remote logging to a central log server (or servers).
sfcli LoggingSession setloginsessioninfo <timeout> Set time period for valid login authentication.
sfcli LoggingSession getloginsessioninfo Return the time period that logins are valid.
Network Commands
sfcli Network listnodefibrechannelportinfo Get info on node fiber channel ports.
sfcli Network listfibrechannelsessions Get info about active fiber channel connections.
sfcli Network listfibrechannelportinfo Get info about fiber channel ports on a node.
sfcli Network listiscsisessions Get info about iSCSI for cluster volumes.
sfcli Network listinterfaces Get info about the network interface on a node.
Node Commands
sfcli Node add <pendingnodes> Add one ore more new nodes to a cluster.
sfcli Node remove <pendingnodes> Remove nodes from a cluster.
sfcli Node setnetworkconfig <network> Set the network config for a node.
sfcli Node setconfig <config> Set all configuration info for a node.
sfcli Node listpending List all currently pending nodes in the system.
sfcli Node listpendingactive List nodes in the pendingactive state.
sfcli Node listall List all active and pending nodes.
sfcli Node liststats View high level activity info for all cluster nodes.
sfcli Node listactive Lists currently active nodes.
sfcli Node getorigin Retrieve the origination certificate for where the node was built.
sfcli Node getpendingoperation Detect node operations that are currently in progress.
sfcli Node getnetworkconfig Display network config info.
sfcli Node getstats <nodeid> Retreive activity info for a single node.
sfcli Node getconfig Get all configuration info for a node.
sfcli Node getbootstrapconfig Get cluster and node info from the bootstrap config file.
sfcli Node getsslcertificate Get the SSL certificate that is currently active on the mgmt node.
sfcli Node removesslcertificate Remove mgmt node SSL cert and private key.
sfcli Node setsslcertificate <certificate> <privatekey> Set a user SSL cert & key for the management node.
Pairing Commands
sfcli Pairing startcluster Create encoded key from cluster to pair with another cluster.
sfcli Pairing completecluster <options> Use with above command to complete pairing process.
sfcli Pairing listclusterpairs List all cluster pairs.
sfcli Pairing removeclusterpair <pairingid> Close the open connections between two paird clusters.
sfcli Pairing startvolume <options> Create encoded key to pair two volumes.
sfcli Pairing completevolume <options> Use with above command to complete pairing process.
sfcli Pairing removevolumepair <volumeid> Remove remote pairing between two volumes.
sfcli Pairing listactivepairedvolumes Lists all active volume pairs.
sfcli Pairing modifyvolumepair <options> Pause or restart replication between a pair of volumes.
Restart Commands
sfcli Restart services <force> <service> <action> Restart the service on a node, will cause service interruption.
sfcli Restart networking <force> Restart networking services on a node.
sfcli Restart resetnode <build> <force> <options> Reset a node to factory settings, but keeps network settings.
sfcli Restart shutdown <nodes> <options> Restart or shutdown a node that is not part of the cluster.
Schedule Commands
sfcli Schedule list Get info about all scheduled snapshots.
sfcli Schedule create <options> Schedule snapshots of volumes.
sfcli Schedule get <scheduleid> Get info about a scheduled snapshot.
sfcli Schedule modify <options> Change intervales when scheduled snapshots happen.
Service Commands
sfcli Service list Return service info for nodes, drives, software, and other services.
Snapshot Commands
sfcli Snapshot listgroup <options> Get info about all group snapshots.
sfcli Snapshot modifygroup <options> Change the attributes of a group of snapshots.
sfcli Snapshot modify <options> Change the attributes currently assigned to a snapshot.
sfcli Snapshot create <options> Create a point in time copy of a volume.
sfcli Snapshot list <options> Return the attributes of each volume snapshot taken.
sfcli Snapshot deletegroup <groupsnapshotid> Delete a group snapshot.
sfcli Snapshot rollbacktogroup <options> Roll back all individual volumes in a snapshot group.
sfcli Snapshot rollbackto <options> Make existing snap of an active volume image, create snap from snap.
sfcli Snapshot creategroup <options> Create a point in time copy of a group of volumes.
sfcli Snapshot delete <snapshotid> Delete a snapshot.
Storage Container Commands
sfcli StorageContainers modifystoragecontainer <options> Make changes to an existing virtual ovlume storage container.
sfcli StorageContainers list <storagecontainerids> Get info about all virtual volume storage containers.
sfcli StorageContainers getstoragecontainerefficiency Retrieve efficiency info about a virtual volume storage container.
sfcli StorageContainers createstoragecontainer Create a Vvol storage container.
sfcli StorageContainers delete <options> Remove up to 2000 Vvol storage containers from the system at once.
Test Commands
sfcli Test list Return the available tests you can run.
sfcli Test ping <options> Validate network connections using ICMP packets.
sfcli Test connectmvip <mvip> Test management connection to the cluster.
sfcli Test listutilities Return operations available on a node.
sfcli Test connectensemble <ensemble> Verify connectivity with a specified database ensemble.
sfcli Test connectsvip <svip> Test storage connection to the cluster.
Virtual Network Commands
sfcli VirtualNetwork add <options> Add a new virtual network to a cluster configuration.
sfcli VirtualNetwork list <options> List all configured virtual networks for the cluster.
sfcli VirtualNetwork remove <options> Remove a virtual network.
sfcli VirtualNetwork modify <options> Change attributes of a virtual network.
Virtual Volume Commands
sfcli VirtualVolume modifyhost <options> Change an existing ESX host.
sfcli VirtualVolume gettaskupdate <options> Checks the status of a VVol Async Task.
sfcli VirtualVolume unbindallfromhost Removes all VVol host binding.
sfcli VirtualVolume modifymetadata <virtualvolumeid> Modify Vvol metadata.
sfcli VirtualVolume modifyvasaproviderinfo <options> Update the VASA provider.
sfcli VirtualVolume querymetadata Return a list of Vvols matching a metadata query.
sfcli VirtualVolume listtasks <vvol_task_ids> Return a list of Vvols in the system.
sfcli VirtualVolume listprotocolendpoints <ids> Get info about all protocol endpoints in the cluster.
sfcli VirtualVolume listvolumestatsby <ids> List volume stats for any volumes associated with Vvols.
sfcli VirtualVolume create <options> Create a new Vvol on the cluster.
sfcli VirtualVolume fastclone <options> Execute a Vmware Vvol fast clone.
sfcli VirtualVolume canceltask <ids> Cancel the Vvol Async task.
sfcli VirtualVolume getallocatedbitmap <options> Returns info regarding segment allocation of a volume.
sfcli VirtualVolume getunsharedbitmap <options> Returns info regarding segment allocation for volumes.
sfcli VirtualVolume listhosts <ids> List of all Vvol hosts known to the cluster.
sfcli VirtualVolume rollback <options> Restore a Vvol snapshot.
sfcli VirtualVolume getunsharedchunks <options> Scans Vvol segment & returns number of chunks not shared by 2 volumes.
sfcli VirtualVolume getallocatedbitmap <options> Returns setgment allocation info about a volume.
sfcli VirtualVolume clone <options> Create a Vvol clone.
sfcli VirtualVolume modify <options> Modify settings on a Vvol.
sfcli VirtualVolume preparevirtualsnapshot <options> Set up Vvol Snapshot.
sfcli VirtualVolume getfeaturestatus <options> Retrieve the status of a cluster feature.
sfcli VirtualVolume unbind <context> Remove Vvol host binding.
sfcli VirtualVolume createhost <options> Create a new ESX host.
sfcli VirtualVolume bind <options> Bind a virtual volume with a host.
sfcli VirtualVolume list <options> List all virtual volumes in the system.
sfcli VirtualVolume getvasaproviderinfo Get VASA provider info.
sfcli VirtualVolume snapshot <options> Take a Vvol snapshot.
sfcli VirtualVolume listbindings <options> List all Vvols in the cluster that are bound to protocol endpoints.
sfcli VirtualVolume getcount Get the number of Vvols in the system.
sfcli VirtualVolume enablefeature <feature> Enable cluster features that are disabled by default.
sfcli VirtualVolume delete <options> Marks an active volume for deletion.
Volume Commands
sfcli Volume getefficiency <volume_id> Get capacity info about a volume.
sfcli Volume liststats <volume_id> Return info for a volume (or volumes), cumulative from volume creation.
sfcli Volume removefromaccessgroup <options> Remove volumes from a volume access group.
sfcli Volume addtoaccessgroup <options> Add volumes to a specific volume access group.
sfcli Volume liststatsbyaccount <options> Return high level measurements for all accounts.
sfcli Volume startbulkwrite <options> Initialize a bulk volume write session on a specific volume.
sfcli Volume updatebulkstatus <options> Update status of a bulk volume job.
sfcli Volume startbulkread <options> Initiailize a bulk volume read session on a specific volume.
sfcli Volume listdeleted <options> Retrieve the list of volumes marked for deletion.
sfcli Volume purgedeleted <volume_id> Immediately purges a volume that has been deleted.
sfcli Volume liststatsby <options> Returns high level activity info for every volume, by volume.
sfcli Volume create <options> Creates a new empty volume on the cluster.
sfcli Volume cancelclone <clone_id> Stops an ongoing volume clone or copy.
sfcli Volume getdefaultqos Retreive the default QoS values for a new volume.
sfcli Volume getasyncresult <options> Get the  result of ansynchronous method calls.
sfcli Volume listasyncresults <options> Lists the results of all currently running & completed async methods.
sfcli Volume liststatsbyaccessgroup <options> Get total activity measurements for all volumes of the volume access group.
sfcli Volume listbulkjobs Retreive info about each bulk volume read or write operation.
sfcli Volume clone <options> Create a copy of a volume.
sfcli Volume modify <options> Modify settings on an existing volume.
sfcli Volume restoredeleted <volume_id> Marks a deleted volume as active again.
sfcli Volume copy <options> Overwrite contents of existing volume with contents of another volume.
sfcli Volume listactive <options> Return a list of active volumes in the system.
sfcli Volume list <options> Get a list of volumes in the cluster.
sfcli Volume clonemultiple <options> Create a clone of a group of specified volumes.
sfcli Volume setdefaultqos <options> Configure default QoS values for a volume.
sfcli Volume getstats <options> Retreive high level activity information for a single volume.
sfcli Volume listforaccount <options> List active and pending deleted volumes for an account.
sfcli Volume getcount Get the number of volumes in the system.
sfcli Volume cancelgroupclone <group_clone_id> Stop an ongoing process for cloning multiple volumes.
sfcli Volume delete <volume_id> Marks an active volume for deletion.
sfcli Volume createqospolicy <name> <qos> Create a QoS policy object that you can later apply to a volume.
sfcli Volume deleteqospolicy <qospolicyid> Delete a QoS policy.
sfcli Volume getqospolicy <qospolicyid> Get details about a specific QoS policy.
sfcli Volume listqospolicies List the settings of all QoS policies.
sfcli Volume modifyqospolicy <options> Modify an existing QoS policy.
Volume Access Group Commands
sfcli VolumeAccessGroup create <options> Create a new Volume Access Group
sfcli VolumeAccessGroup modify <options> Update Initiators/Remove Volumes from a volume access group.
sfcli VolumeAccessGroup modifylunassignments <options> Define custom LUN assignments for specific volumes.
sfcli VolumeAccessGroup list <options> Return information about the volume access groups in the system.
sfcli VolumeAccessGroup getlunassignments <options> Retrieve details on LUN mappings of a specific volume access group.
sfcli VolumeAccessGroup getefficiency <options> Retrieve efficiency info about a volume access group.
sfcli VolumeAccessGroup delete <id> Delete a volume access group.

 

Advertisements

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.