github.com/gophercloud/gophercloud@v1.11.0/openstack/sharedfilesystems/v2/shares/doc.go (about)

     1  /*
     2  Package shares provides information and interaction with the different
     3  API versions for the Shared File System service, code-named Manila.
     4  
     5  For more information, see:
     6  https://docs.openstack.org/api-ref/shared-file-system/
     7  
     8  Example to Revert a Share to a Snapshot ID
     9  
    10  	opts := &shares.RevertOpts{
    11  		// snapshot ID to revert to
    12  		SnapshotID: "ddeac769-9742-497f-b985-5bcfa94a3fd6",
    13  	}
    14  	manilaClient.Microversion = "2.27"
    15  	err := shares.Revert(manilaClient, shareID, opts).ExtractErr()
    16  	if err != nil {
    17  		panic(err)
    18  	}
    19  
    20  Example to Reset a Share Status
    21  
    22  	opts := &shares.ResetStatusOpts{
    23  		// a new Share Status
    24  		Status: "available",
    25  	}
    26  	manilaClient.Microversion = "2.7"
    27  	err := shares.ResetStatus(manilaClient, shareID, opts).ExtractErr()
    28  	if err != nil {
    29  		panic(err)
    30  	}
    31  
    32  Example to Force Delete a Share
    33  
    34  	manilaClient.Microversion = "2.7"
    35  	err := shares.ForceDelete(manilaClient, shareID).ExtractErr()
    36  	if err != nil {
    37  		panic(err)
    38  	}
    39  
    40  Example to Unmanage a Share
    41  
    42  	manilaClient.Microversion = "2.7"
    43  	err := shares.Unmanage(manilaClient, shareID).ExtractErr()
    44  	if err != nil {
    45  		panic(err)
    46  	}
    47  */
    48  package shares