client/lxd_containers.go
func (r *ProtocolLXD) CreateContainerSnapshot(containerName string, snapshot api.ContainerSnapshotsPost) (Operation, error) {
	// Validate the request
	if snapshot.ExpiresAt != nil && !r.HasExtension("snapshot_expiry_creation") {
		return nil, fmt.Errorf("The server is missing the required \"snapshot_expiry_creation\" API extension")
	}

	// Send the request
	op, _, err := r.queryOperation("POST", fmt.Sprintf("/containers/%s/snapshots", url.QueryEscape(containerName)), snapshot, "")
	if err != nil {
		return nil, err
	}

	return op, nil
}
func (r *ProtocolLXD) CreateContainerSnapshot(containerName string, snapshot api.ContainerSnapshotsPost) (Operation, error) {
	// Validate the request
	if snapshot.ExpiresAt != nil && !r.HasExtension("snapshot_expiry_creation") {
		return nil, fmt.Errorf("The server is missing the required \"snapshot_expiry_creation\" API extension")
	}

	// Send the request
	op, _, err := r.queryOperation("POST", fmt.Sprintf("/containers/%s/snapshots", url.QueryEscape(containerName)), snapshot, "")
	if err != nil {
		return nil, err
	}

	return op, nil
}
func ( r * ProtocolLXD ) CreateContainerSnapshot ( containerName string , snapshot api . ContainerSnapshotsPost ) ( Operation , error ) { // Validate the request if snapshot . ExpiresAt != nil && ! r . HasExtension ( " " ) { return nil , fmt . Errorf ( " \" \" " ) } // Send the request op , _ , err := r . queryOperation ( " " , fmt . Sprintf ( " " , url . QueryEscape ( containerName ) ) , snapshot , " " ) if err != nil { return nil , err } return op , nil }
// CreateContainerSnapshot requests that LXD creates a new snapshot for the container
CreateContainerSnapshot requests that LXD creates a new snapshot for the container