FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


hardware:netapp:index.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hardware:netapp:index.html [2018/02/01 00:33]
kurihara
hardware:netapp:index.html [2018/02/22 23:31]
kurihara
Line 1: Line 1:
-[[:index.html#OS Management|Top#OS Management]] +[[:index.html#Hardware|Top#Hardware]] 
-====== NetApp (netapp.py)=====+====== NetApp Configuration with Fabric (netapp.py)=====
  
 $FHHOME/fabfile/netapp.py $FHHOME/fabfile/netapp.py
Line 7: Line 7:
 \\ \\
  
-===== Operation =====+===== Fabric Operation =====
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
Line 14: Line 14:
 </sxh> </sxh>
  
-==== Ref. Remote Shell Commands ====+\\ 
 +==== How to Check to Use Fabric in NetApp ====
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-echo xx.xx.xx.xx | fab auth.netapppro -s False -- xxxxxx+ssh user01@xx.xx.xx.xx cluster show
 </sxh> </sxh>
 +
 +
 +
 +/*
 +==== Fabric Remote Shell Commands ====
 +<sxh bash toolbar:false gutter:false>
 +$ echo xx.xx.xx.xx | fab auth.netapppro --set shell=False --no-pty  -- system health status show
 +</sxh>
 +*/
 +
  
 \\ \\
Line 25: Line 36:
  
 <sxh python toolbar:false gutter:false> <sxh python toolbar:false gutter:false>
-import sys+import sys, os
 from fabric.api import * from fabric.api import *
 from fabric.contrib import files from fabric.contrib import files
  
 +env.eagerly_disconnect = False
 FHHOME=os.environ["FHHOME"] FHHOME=os.environ["FHHOME"]
  
-#================================================================================ +
-# test +
-#================================================================================+
 #------------------------------------------------------------------ #------------------------------------------------------------------
-# netapp.test+# netapp.cluster_show
 #------------------------------------------------------------------ #------------------------------------------------------------------
 @task @task
-def test(): +def cluster_show(): 
-    run("rows 0" , shell=False)+    """cluster show # check node status""" 
 +    run("cluster show" , shell=False) 
 + 
 + 
 +#------------------------------------------------------------------ 
 +# Check System Health 
 +#------------------------------------------------------------------ 
 +@task 
 +def system_health_status_show(): 
 +    run("system health status show" , shell=False) 
 + 
 +@task 
 +def system_health_subsystem_show():
     run("system health subsystem show" , shell=False)     run("system health subsystem show" , shell=False)
  
 +@task
 +def system_health_config_show():
 +    run("system health config show" , shell=False)
 +
 +@task
 +def storage_shelf_show_connectivity():
 +    """storage shelf show -connectivity"""
 +    run("storage shelf show -connectivity" , shell=False)
 +
 +@task
 +def storage_disk_show():
 +    run("storage disk show" , shell=False)
 +
 +@task
 +def system_cluster_switch_show():
 +    """system cluster-switch show"""
 +    run("system cluster-switch show" , shell=False)
 +
 +#------------------------------------------------------------------
 +# Check ALERT
 +#------------------------------------------------------------------
 +@task
 +def system_health_alert_show():
 +    run("system health alert show" , shell=False)
 +
 +@task
 +def system_health_alert_show_instance():
 +    run("system health alert show -instance" , shell=False)
 +
 +#------------------------------------------------------------------
 +# HA
 +#------------------------------------------------------------------
 +@task
 +def storage_failover_show():
 +    run("storage failover show" , shell=False)
 +
 +@task
 +def cluster_ha_show():
 +    run("cluster ha show" , shell=False)
 +
 +
 +#==============================================================================
 +# Storage
 +#==============================================================================
 +#------------------------------------------------------------------
 +# Disk
 +#------------------------------------------------------------------
 +@task
 +def storage_aggregate_show():
 +    run("storage aggregate show" , shell=False)
 +
 +@task
 +def disk_show_aggregate(aggr):
 +    """disk_show_aggregate:aggr1  # disk show -aggregate aggr1"""
 +    run("disk show -aggregate %s" % aggr , shell=False)
 +
 +#------------------------------------------------------------------
 +# Volume
 +#------------------------------------------------------------------
 +@task
 +def volume_show():
 +    run("volume show" , shell=False)
 +
 +#------------------------------------------------------------------
 +# LUN
 +#------------------------------------------------------------------
 +@task
 +def lun_show():
 +    run("lun show" , shell=False)
 +
 +#------------------------------------------------------------------
 +# NFS
 +#------------------------------------------------------------------
 +@task
 +def vserver_export_policy_rule_show():
 +    """vserver export-policy rule show"""
 +    run("vserver export-policy rule show" , shell=False)
 +
 +@task
 +def volume_show_fields_policy():
 +    """volume show -fields policy"""
 +    run("volume show -fields policy" , shell=False)
 +
 +#------------------------------------------------------------------
 +# CIFS
 +#------------------------------------------------------------------
 +@task
 +def vserver_cifs_show():
 +    run("vserver cifs show" , shell=False)
 +
 +@task
 +def vserver_cifs_share_show():
 +    run("vserver cifs share show" , shell=False)
 +
 +
 +
 +
 +#==============================================================================
 +# Network
 +#==============================================================================
 +#------------------------------------------------------------------
 +# SVM(Server Virtual Machine)
 +#------------------------------------------------------------------
 +@task
 +def vserver_show():
 +    run("vserver show" , shell=False)
 +
 +#------------------------------------------------------------------
 +# Interface
 +#------------------------------------------------------------------
 +@task
 +def network_port_ifgrp_show():
 +    """check interface group"""
 +    run("network port ifgrp show" , shell=False)
 +
 +@task
 +def network_port_vlan_show():
 +    run("network port vlan show" , shell=False)
 +
 +@task
 +def network_interface_failover_groups_show():
 +    """network interface failover-groups show"""
 +    run("network interface failover-groups show" , shell=False)
 +
 +#------------------------------------------------------------------
 +# LIF(Logical Interface)
 +#------------------------------------------------------------------
 +@task
 +def vserver_show():
 +    run("vserver show" , shell=False)
 +
 +
 +#------------------------------------------------------------------
 +# Network
 +#------------------------------------------------------------------
 +@task
 +def network_routing_groups_route_show():
 +    """network routing-groups route show"""
 +    run("network routing-groups route show" , shell=False)
  
 </sxh> </sxh>
Line 55: Line 216:
 \\ \\
 \\ \\
-[[:index.html#OS Management|Top#OS Management]]+[[:index.html#Hardware|Top#Hardware]]


hardware/netapp/index.html.txt · Last modified: 2018/02/22 23:49 by kurihara