def list_aggregate_pycl() -> None: """List the aggregates.""" print("\n List of Aggregates:- \n") try: print(*(aggr.name for aggr in Aggregate.get_collection()), sep="\n") except NetAppRestError as err: print("Error: Aggregate list could not be retrieved: %s" % err)
def list_aggregate() -> None: """Lists the Aggregate""" print("\n List of Aggregates:- \n") try: for aggregatelist in Aggregate.get_collection(): print(aggregatelist.name) except NetAppRestError as error: print("Exception caught :" + str(error))
def show_aggregate() -> None: """Lists the Aggregate""" print("\n List of Aggregates:- \n") try: for aggregatelist in Aggregate.get_collection(): print(aggregatelist.name) except NetAppRestError as error: print("Error:- " % error.http_err_response.http_response.text) print("Exception caught :" + str(error))
def list_aggregate_pycl() -> None: """List the aggregates.""" print("\n List of Aggregates:- \n") try: for aggregatelist in Aggregate.get_collection(): aggregatelist.get() print(aggregatelist.name) except NetAppRestError as err: print("Error: Aggregate list was not created: %s" % err) return
async def get_aggregates(self, message): """ A skills function to get all aggregates on the cluster. The parser looks for the message argument. Arguments: message {str} -- get aggregates on cluster """ aggregates = [] for aggr in Aggregate.get_collection(): aggr.get(fields='name') aggregates.append(aggr.name) await message.respond('All done! Response: {}'.format(aggregates))
def show_aggregate(api, apiuser, apipass): config.CONNECTION = HostConnection(api, apiuser, apipass, verify=False) print("\n List of Aggregates:- \n") for aggregatelist in Aggregate.get_collection(fields="uuid"): print(aggregatelist.name) return
# Nodes print("--> Printing node details") print("{:<20}{:<15}{:<15}{:<15}{:<10}".format("Name", "Node", "Size", "Used", "State")) for node in Node.get_collection(): node.get() print("{:<20}{:<15}{:<10}".format(node.name, node.serial_number, node.model)) print("") # Aggregates print("--> Printing aggregate details") print("{:<20}{:<15}{:<15}{:<15}{:<10}".format("Name", "Node", "Size", "Used", "State")) for aggr in Aggregate.get_collection(): aggr.get() print("{:<20}{:<15}{:<15}{:<15}{:<10}".format( aggr.name, aggr.home_node.name, aggr.space.block_storage.size, aggr.space.block_storage.used, aggr.state)) print("") # Ports print("--> Printing port details") print("{:<10}{:<15}{:<10}{:<10}{:<10}{:<15}".format("Name", "Node", "Speed", "MTU", "State", "BC Domain")) for port in Port.get_collection(): port.get() print("{:<10}{:<15}{:<10}{:<10}{:<10}{:<15}".format( port.name, port.node.name, port.speed, port.mtu, port.state,