github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dms/v2/products/results.go (about)

     1  package products
     2  
     3  import golangsdk "github.com/opentelekomcloud/gophertelekomcloud"
     4  
     5  type GetResult struct {
     6  	golangsdk.Result
     7  }
     8  type GetResponse struct {
     9  	Hourly  []Parameter `json:"Hourly"`
    10  	Monthly []Parameter `json:"Monthly"`
    11  }
    12  
    13  // Parameter for dms
    14  type Parameter struct {
    15  	Name    string  `json:"name"`
    16  	Version string  `json:"version"`
    17  	Values  []Value `json:"values"`
    18  }
    19  
    20  // Value for dms
    21  type Value struct {
    22  	Details          []Detail `json:"detail"`
    23  	Name             string   `json:"name"`
    24  	UnavailableZones []string `json:"unavailable_zones"`
    25  	AvailableZones   []string `json:"available_zones"`
    26  }
    27  
    28  // Detail for dms
    29  type Detail struct {
    30  	Storage          string        `json:"storage"`
    31  	ProductID        string        `json:"product_id"`
    32  	SpecCode         string        `json:"spec_code"`
    33  	VMSpecification  string        `json:"vm_specification"`
    34  	ProductInfos     []ProductInfo `json:"product_info"`
    35  	PartitionNum     string        `json:"partition_num"`
    36  	Bandwidth        string        `json:"bandwidth"`
    37  	Tps              string        `json:"tps"`
    38  	IOs              []IO          `json:"io"`
    39  	UnavailableZones []string      `json:"unavailable_zones"`
    40  	AvailableZones   []string      `json:"available_zones"`
    41  	EcsFlavorId      string        `json:"ecs_flavor_id"`
    42  	ArchType         string        `json:"arch_type"`
    43  }
    44  
    45  // ProductInfo for dms
    46  type ProductInfo struct {
    47  	Storage          string   `json:"storage"`
    48  	NodeNum          string   `json:"node_num"`
    49  	ProductID        string   `json:"product_id"`
    50  	SpecCode         string   `json:"spec_code"`
    51  	IOs              []IO     `json:"io"`
    52  	AvailableZones   []string `json:"available_zones"`
    53  	UnavailableZones []string `json:"unavailable_zones"`
    54  }
    55  
    56  type IO struct {
    57  	IOType           string   `json:"io_type"`
    58  	StorageSpecCode  string   `json:"storage_spec_code"`
    59  	AvailableZones   []string `json:"available_zones"`
    60  	UnavailableZones []string `json:"unavailable_zones"`
    61  	VolumeType       string   `json:"volume_type"`
    62  }
    63  
    64  // ListResp is the structure that represents the request response of List method.
    65  type ListResp struct {
    66  	// The engine type of the DMS products.
    67  	Engine string `json:"engine"`
    68  	// The supported product version types.
    69  	Versions []string `json:"versions"`
    70  	// The list of product details.
    71  	Products []Product `json:"products"`
    72  }
    73  
    74  // Product is the structure that represents the details of the product specification.
    75  type Product struct {
    76  	// product type. The current product types are stand-alone and cluster.
    77  	Type string `json:"type"`
    78  	// Product ID.
    79  	ProductId string `json:"product_id"`
    80  	// The underlying resource type.
    81  	EcsFlavorId string `json:"ecs_flavor_id"`
    82  	// Billing type.
    83  	BillingCode string `json:"billing_code"`
    84  	// List of supported CPU architectures.
    85  	ArchTypes []string `json:"arch_types"`
    86  	// List of supported billing modes.
    87  	//   monthly: yearly/monthly type.
    88  	//   hourly: On-demand type.
    89  	ChargingModes []string `json:"charging_mode"`
    90  	// List of supported disk IO types.
    91  	IOs []IOEntity `json:"ios"`
    92  	// A list of features supported by the current specification instance.
    93  	SupportFeatures []SupportFeatureEntity `json:"support_features"`
    94  	// Properties of the current specification instance.
    95  	Properties PropertiesEntity `json:"properties"`
    96  }
    97  
    98  // IOEntity is the structure that represents the disk IO type information.
    99  type IOEntity struct {
   100  	// Disk IO encoding.
   101  	IoSpec string `json:"io_spec"`
   102  	// Disk type.
   103  	Type string `json:"type"`
   104  	// Availability Zone.
   105  	AvailableZones []string `json:"available_zones"`
   106  	// Unavailable zone.
   107  	UnavailableZones []string `json:"unavailable_zones"`
   108  }
   109  
   110  // SupportFeatureEntity is the structure that represents the features supported by the instance.
   111  type SupportFeatureEntity struct {
   112  	// function name.
   113  	Name string `json:"name"`
   114  	// Description of the function properties supported by the instance.
   115  	Properties SupportFeaturePropertiesEntity `json:"properties"`
   116  }
   117  
   118  // SupportFeaturePropertiesEntity is the structure that represents the description of the functional properties
   119  // supported by the instance.
   120  type SupportFeaturePropertiesEntity struct {
   121  	// The maximum number of tasks for the dump function.
   122  	MaxTask string `json:"max_task"`
   123  	// Minimum number of tasks for dump function.
   124  	MinTask string `json:"min_task"`
   125  	// Maximum number of nodes for dump function.
   126  	MaxNode string `json:"max_node"`
   127  	// Minimum number of nodes for dump function.
   128  	MinNode string `json:"min_node"`
   129  }
   130  
   131  // PropertiesEntity is the structure that represents the properties of the current specification instance.
   132  type PropertiesEntity struct {
   133  	// Maximum number of partitions per broker.
   134  	MaxPartitionPerBroker string `json:"max_partition_per_broker"`
   135  	// The maximum number of brokers.
   136  	MaxBroker string `json:"max_broker"`
   137  	// Maximum storage per node. The unit is GB.
   138  	MaxStoragePerNode string `json:"max_storage_per_node"`
   139  	// Maximum number of consumers per broker.
   140  	MaxConsumerPerBroker string `json:"max_consumer_per_broker"`
   141  	// The minimum number of brokers.
   142  	MinBroker string `json:"min_broker"`
   143  	// Maximum bandwidth per broker.
   144  	MaxBandwidthPerBroker string `json:"max_bandwidth_per_broker"`
   145  	// Minimum storage per node. The unit is GB.
   146  	MinStoragePerNode string `json:"min_storage_per_node"`
   147  	// Maximum TPS per Broker.
   148  	MaxTpsPerBroker string `json:"max_tps_per_broker"`
   149  	// Product ID alias.
   150  	ProductAlias string `json:"product_alias"`
   151  }