Table of Contents

Top#Hardware

NetApp Configuration with Fabric (netapp.py)

$FHHOME/fabfile/netapp.py


Fabric Operation

$ fab  -l |grep netapp
$ echo xx.xx.xx.xx | fab  auth.pro  netapp.xxxx


How to Check to Use Fabric in NetApp

$ ssh user01@xx.xx.xx.xx cluster show


netapp.py

$FHHOME/fabfile/wincheck.py

import sys, os
from fabric.api import *
from fabric.contrib import files

env.eagerly_disconnect = False
FHHOME=os.environ["FHHOME"]


#------------------------------------------------------------------
# netapp.cluster_show
#------------------------------------------------------------------
@task
def cluster_show():
    """cluster show # check node status"""
    run("cluster show" , shell=False)


#------------------------------------------------------------------
# Check System Health
#------------------------------------------------------------------
@task
def check_system_health():
    run("system health status show" , shell=False)
    run("system health subsystem show" , shell=False)
    run("system health config show" , shell=False)
    run("storage shelf show -connectivity" , shell=False)
    run("system cluster-switch show" , shell=False)


#------------------------------------------------------------------
# Check ALERT
#------------------------------------------------------------------
@task
def check_alert():
    run("system health alert show" , shell=False)
    run("system health alert show -instance" , shell=False)


#------------------------------------------------------------------
# Check HA
#------------------------------------------------------------------
@task
def check_ha():
    run("storage failover show" , shell=False)
    run("cluster ha show" , shell=False)


#==============================================================================
# Storage
#==============================================================================
#------------------------------------------------------------------
# Disk
#------------------------------------------------------------------
@task
def check_disk():
    run("storage aggregate show" , shell=False)
    run("storage disk show" , shell=False)
    run("volume 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)

#------------------------------------------------------------------
# LUN
#------------------------------------------------------------------
@task
def check_lun():
    run("lun show" , shell=False)

#------------------------------------------------------------------
# NFS
#------------------------------------------------------------------
@task
def check_nfs():
    run("vserver export-policy rule show" , shell=False)
    run("volume show -fields policy" , shell=False)

#------------------------------------------------------------------
# CIFS
#------------------------------------------------------------------
@task
def check_cifs():
    run("vserver cifs show" , shell=False)
    run("vserver cifs share show" , shell=False)


#==============================================================================
# Network
#==============================================================================
#------------------------------------------------------------------
# SVM(Server Virtual Machine)
#------------------------------------------------------------------
@task
def vserver_show():
    run("vserver show" , shell=False)

#------------------------------------------------------------------
# Network
#------------------------------------------------------------------
@task
def check_network():
    run("network port ifgrp show" , shell=False)
    run("network port vlan show" , shell=False)
    run("network interface failover-groups show" , shell=False)
    run("network routing-groups route show" , shell=False)

#------------------------------------------------------------------
# LIF(Logical Interface)
#------------------------------------------------------------------



Top#Hardware





Top#Hardware