def patch_qtree() -> None:
    """Update Qtree"""
    print("=============================================")
    print()
    vol_uuid = show_qtree()

    print()
    print("=============================================")
    print("Enter the following details to Update a qtree")

    qtree_name = input("Enter the Name of the Qtree to be updated:-")

    try:
        qtree = Qtree.find(vol_uuid, name=qtree_name)
    except NetAppRestError as error:
        print("Error:- " % error.http_err_response.http_response.text)
        print("Exception caught :" + str(error))

    nambool = input("Would you like to update the Qtree name (y/n): ")
    if nambool == 'y':
        qtreename = input("Enter the name of the qtree to be updated:-")
        qtree.name = qtreename

    try:
        if qtree.patch(poll=True):
            print("Qtree  %s Updated Successfully" % qtree.name)
    except NetAppRestError as error:
        print("Error:- " % error.http_err_response.http_response.text)
        print("Exception caught :" + str(error))
示例#2
0
def delete_qtree() -> None:
    """Delete Qtree"""
    print("=============================================")
    print()
    print("The List of SVMs:-")
    show_svm()
    print()
    svm_name = input(
        "Enter the SVM from which the Volumes need to be listed:-")
    print()
    show_volume(svm_name)
    print()
    volume_name = input(
        "Enter the Volume from which the Snapshots need to be listed:-")
    print()
    vol_uuid = get_key_volume(svm_name, volume_name)
    show_qtree(svm_name, volume_name)
    print()
    print("=============================================")
    print("Enter the following details to Delete a qtree")

    qtree_name = input("Enter the Name of the Qtree to be Deleted:-")

    try:
        qtree = Qtree.find(vol_uuid, name=qtree_name)
    except NetAppRestError as error:
        print("Exception caught :" + str(error))

    try:
        if qtree.delete(poll=True):
            print("Qtree  %s has been deleted Successfully." % qtree.name)
    except NetAppRestError as error:
        print("Exception caught :" + str(error))
示例#3
0
def patch_qtree() -> None:
    """Update Qtree"""
    print("=============================================")
    print()
    print("The List of SVMs:-")
    show_svm()
    print()
    svm_name = input(
        "Enter the SVM from which the Volumes need to be listed:-")
    print()
    show_volume(svm_name)
    print()
    volume_name = input(
        "Enter the Volume from which the Snapshots need to be listed:-")
    print()
    vol_uuid = get_key_volume(svm_name, volume_name)
    show_qtree(svm_name, volume_name)
    print()
    print("=============================================")
    print("Enter the following details to Update a qtree")

    qtree_name = input("Enter the Name of the Qtree to be updated:-")

    try:
        qtree = Qtree.find(vol_uuid, name=qtree_name)
    except NetAppRestError as error:
        print("Exception caught :" + str(error))

    nambool = input("Would you like to update the Qtree name (y/n): ")
    if nambool == 'y':
        qtreename = input("Enter the name of the qtree to be updated:-")
        qtree.name = qtreename

    try:
        if qtree.patch(poll=True):
            print("Qtree  %s Updated Successfully" % qtree.name)
    except NetAppRestError as error:
        print("Exception caught :" + str(error))
def delete_qtree() -> None:
    """Delete Qtree"""
    print("=============================================")
    print()
    vol_uuid = show_qtree()
    print()
    print("=============================================")
    print("Enter the following details to Delete a qtree")

    qtree_name = input("Enter the Name of the Qtree to be Deleted:-")

    try:
        qtree = Qtree.find(vol_uuid, name=qtree_name)
    except NetAppRestError as error:
        print("Error:- " % error.http_err_response.http_response.text)
        print("Exception caught :" + str(error))

    try:
        if qtree.delete(poll=True):
            print("Qtree  %s has been deleted Successfully." % qtree.name)
    except NetAppRestError as error:
        print("Error:- " % error.http_err_response.http_response.text)
        print("Exception caught :" + str(error))