1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
package api
// NetworkIntegrationsPost represents the fields of a new network integration
//
// swagger:model
//
// API extension: network_integrations.
type NetworkIntegrationsPost struct {
NetworkIntegrationPut `yaml:",inline"`
// The name of the integration
// Example: region1
Name string `json:"name" yaml:"name"`
// The type of integration
// Example: ovn
Type string `json:"type" yaml:"type"`
}
// NetworkIntegrationPut represents the modifiable fields of a network integration
//
// swagger:model
//
// API extension: network_integrations.
type NetworkIntegrationPut struct {
// Description of the network integration
// Example: OVN interconnection for region1
Description string `json:"description" yaml:"description"`
// Integration configuration map (refer to doc/network-integrations.md)
// Example: {"user.mykey": "foo"}
Config map[string]string `json:"config" yaml:"config"`
}
// NetworkIntegration represents a network integration.
//
// swagger:model
//
// API extension: network_integrations.
type NetworkIntegration struct {
NetworkIntegrationPut `yaml:",inline"`
// The name of the integration
// Example: region1
Name string `json:"name" yaml:"name"`
// The type of integration
// Example: ovn
Type string `json:"type" yaml:"type"`
// List of URLs of objects using this network integration
// Read only: true
// Example: ["/1.0/networks/foo", "/1.0/networks/bar"]
UsedBy []string `json:"used_by" yaml:"used_by"` // Resources that use the integration.
}
// Writable converts a full NetworkIntegration struct into a NetworkIntegrationPut struct (filters read-only fields).
func (f *NetworkIntegration) Writable() NetworkIntegrationPut {
return f.NetworkIntegrationPut
}
// NetworkIntegrationPost represents the fields required to rename a network integration
//
// swagger:model
//
// API extension: network_integrations.
type NetworkIntegrationPost struct {
// The new name for the network integration
// Example: region2
Name string `json:"name" yaml:"name"`
}
|