lxd/resources.go
func storagePoolResourcesGet(d *Daemon, r *http.Request) Response {
	// If a target was specified, forward the request to the relevant node.
	response := ForwardedResponseIfTargetIsRemote(d, r)
	if response != nil {
		return response
	}

	// Get the existing storage pool
	poolName := mux.Vars(r)["name"]
	s, err := storagePoolInit(d.State(), poolName)
	if err != nil {
		return InternalError(err)
	}

	err = s.StoragePoolCheck()
	if err != nil {
		return InternalError(err)
	}

	res, err := s.StoragePoolResources()
	if err != nil {
		return InternalError(err)
	}

	return SyncResponse(true, &res)
}
func storagePoolResourcesGet(d *Daemon, r *http.Request) Response {
	// If a target was specified, forward the request to the relevant node.
	response := ForwardedResponseIfTargetIsRemote(d, r)
	if response != nil {
		return response
	}

	// Get the existing storage pool
	poolName := mux.Vars(r)["name"]
	s, err := storagePoolInit(d.State(), poolName)
	if err != nil {
		return InternalError(err)
	}

	err = s.StoragePoolCheck()
	if err != nil {
		return InternalError(err)
	}

	res, err := s.StoragePoolResources()
	if err != nil {
		return InternalError(err)
	}

	return SyncResponse(true, &res)
}
func storagePoolResourcesGet ( d * Daemon , r * http . Request ) Response { // If a target was specified, forward the request to the relevant node. response := ForwardedResponseIfTargetIsRemote ( d , r ) if response != nil { return response } // Get the existing storage pool poolName := mux . Vars ( r ) [ " " ] s , err := storagePoolInit ( d . State ( ) , poolName ) if err != nil { return InternalError ( err ) } err = s . StoragePoolCheck ( ) if err != nil { return InternalError ( err ) } res , err := s . StoragePoolResources ( ) if err != nil { return InternalError ( err ) } return SyncResponse ( true , & res ) }
// /1.0/storage-pools/{name}/resources
// Get resources for a specific storage pool
/ 1 . 0 / storage - pools / { name } / resources Get resources for a specific storage pool