I am not sure if i should reach out for Python stuff but i hope you may help out.. which is really helpful.
Normally below script will execute for given one cluster.
Requirement: I would like to run same script for multiple clusters at a single execute ( like I need to call all clusters from one file e.g C:\Users\u630850\cluster_list.txt ) and then execute. Since I am not familiar with loops, I am reaching out for assistance. Thank you. 🙂
print("\n ~~ This script is to gather volume list for one cluster ~~\n") cluster = input('Enter ONTAP Cluster Name:')
If your intention is to enumerate a list of offline volumes amongst your clusters have you considered that it would be far more efficient to invoke a single REST API call to Active IQ Unified Manager (AIQUM)? If you have several clusters in your environment and you are not using AIQUM to monitor them then i'd advise installing it.
The additional benefits of this approach are:
Results will be dynamically updated as your environment changes (EG clusters are added or removed from AIQUM) then you won't have to manually update your cluster list input file.
AIQUM manages the credentials to query each cluster into a single repository so you will not be prompted for credentials to connect to each cluster or have to delegate a common local user account on each cluster for API reporting purposes.