client/lxd_networks.go
func (r *ProtocolLXD) GetNetworkState(name string) (*api.NetworkState, error) {
	if !r.HasExtension("network_state") {
		return nil, fmt.Errorf("The server is missing the required \"network_state\" API extension")
	}

	state := api.NetworkState{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", fmt.Sprintf("/networks/%s/state", url.QueryEscape(name)), nil, "", &state)
	if err != nil {
		return nil, err
	}

	return &state, nil
}
func (r *ProtocolLXD) GetNetworkState(name string) (*api.NetworkState, error) {
	if !r.HasExtension("network_state") {
		return nil, fmt.Errorf("The server is missing the required \"network_state\" API extension")
	}

	state := api.NetworkState{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", fmt.Sprintf("/networks/%s/state", url.QueryEscape(name)), nil, "", &state)
	if err != nil {
		return nil, err
	}

	return &state, nil
}
func ( r * ProtocolLXD ) GetNetworkState ( name string ) ( * api . NetworkState , error ) { if ! r . HasExtension ( " " ) { return nil , fmt . Errorf ( " \" \" " ) } state := api . NetworkState { } // Fetch the raw value _ , err := r . queryStruct ( " " , fmt . Sprintf ( " " , url . QueryEscape ( name ) ) , nil , " " , & state ) if err != nil { return nil , err } return & state , nil }
// GetNetworkState returns metrics and information on the running network
GetNetworkState returns metrics and information on the running network