write basic
This commit is contained in:
parent
d43ef9b093
commit
333c4b1768
6 changed files with 33 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
This repository contains a number of scripts that are designed to interact with HPE iLO BMCs (Hewlett Packard Enterprises, integrated Lights Out, Baseboard Management Controllers ) to access information and provide limited actuation. If usage information is not provided through the help text for each script, care should be taken when determining what the script will do before running.
|
|
@ -3,9 +3,15 @@ import argparse
|
|||
import paramiko
|
||||
import getpass
|
||||
import logging
|
||||
|
||||
#Configure and commence logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(filename='python.log', level=logging.DEBUG)
|
||||
logger.debug('logging start')
|
||||
|
||||
|
||||
|
||||
with open('hosts-in.csv',encoding='utf8') as csvfile:
|
||||
csvreader = csv.reader(csvfile, delimiter=',')
|
||||
next(csvreader)
|
||||
|
|
|
@ -3,9 +3,13 @@ import argparse
|
|||
import paramiko
|
||||
import getpass
|
||||
import logging
|
||||
|
||||
#Configure and commence logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(filename='python.log', level=logging.DEBUG)
|
||||
logger.debug('logging start')
|
||||
|
||||
with open('hosts-in.csv',encoding='utf8') as csvfile:
|
||||
csvreader = csv.reader(csvfile, delimiter=',')
|
||||
next(csvreader)
|
||||
|
|
|
@ -4,9 +4,13 @@ import paramiko
|
|||
import getpass
|
||||
import logging
|
||||
import re
|
||||
|
||||
#Configure and commence logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(filename='python.log', level=logging.DEBUG)
|
||||
logger.debug('logging start')
|
||||
|
||||
with open('hosts-in.csv',encoding='utf8') as csvfile,open('MACs.csv','w') as csvfile_out:
|
||||
csvreader = csv.reader(csvfile, delimiter=',')
|
||||
csvwriter = csv.writer(csvfile_out)
|
||||
|
|
|
@ -4,9 +4,18 @@ import paramiko
|
|||
import getpass
|
||||
import logging
|
||||
import re
|
||||
|
||||
#Configure and commence logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(filename='python.log', level=logging.DEBUG)
|
||||
logger.debug('logging start')
|
||||
|
||||
#Set up argument parsing
|
||||
|
||||
parser = argparse.ArgumentParser("get-serials.py")
|
||||
parser.add_argument(help="This script will access every host BMC in the hosts-in.csv list and retrieve the serial number for them, writing them out to a csv file, along with the system host name for identification.")
|
||||
|
||||
with open('hosts-in.csv',encoding='utf8') as csvfile,open('serials.csv','w') as csvfile_out:
|
||||
csvreader = csv.reader(csvfile, delimiter=',')
|
||||
csvwriter = csv.writer(csvfile_out)
|
||||
|
|
|
@ -3,9 +3,18 @@ import argparse
|
|||
import paramiko
|
||||
import getpass
|
||||
import logging
|
||||
|
||||
#Configure and commence logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(filename='python.log', level=logging.DEBUG)
|
||||
logger.debug('logging start')
|
||||
|
||||
#Set up argument parsing
|
||||
|
||||
parser = argparse.ArgumentParser("set-ipmi-enabled.py")
|
||||
parser.add_argument(help="This script will take every host BMC in the hosts-in.csv list and set map1/config1 oemHPE_ipmi_dcmi_overlan_enable=yes on it.")
|
||||
|
||||
with open('hosts-in.csv',encoding='utf8') as csvfile:
|
||||
csvreader = csv.reader(csvfile, delimiter=',')
|
||||
next(csvreader)
|
||||
|
|
Loading…
Add table
Reference in a new issue