yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/apis/compute/network_const.go (about)

     1  // Copyright 2019 Yunion
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package compute
    16  
    17  const (
    18  	// # DEFAULT_BANDWIDTH = options.default_bandwidth
    19  	MAX_BANDWIDTH = 100000
    20  
    21  	NETWORK_TYPE_GUEST     = "guest"
    22  	NETWORK_TYPE_BAREMETAL = "baremetal"
    23  	NETWORK_TYPE_CONTAINER = "container"
    24  	NETWORK_TYPE_PXE       = "pxe"
    25  	NETWORK_TYPE_IPMI      = "ipmi"
    26  	NETWORK_TYPE_EIP       = "eip"
    27  
    28  	STATIC_ALLOC = "static"
    29  
    30  	MAX_NETWORK_NAME_LEN = 11
    31  
    32  	EXTRA_DNS_UPDATE_TARGETS = "__extra_dns_update_targets"
    33  
    34  	NETWORK_STATUS_INIT          = "init"
    35  	NETWORK_STATUS_PENDING       = "pending"
    36  	NETWORK_STATUS_AVAILABLE     = "available"
    37  	NETWORK_STATUS_UNAVAILABLE   = "unavailable"
    38  	NETWORK_STATUS_FAILED        = "failed"
    39  	NETWORK_STATUS_UNKNOWN       = "unknown"
    40  	NETWORK_STATUS_START_DELETE  = "start_delete"
    41  	NETWORK_STATUS_DELETING      = "deleting"
    42  	NETWORK_STATUS_DELETED       = "deleted"
    43  	NETWORK_STATUS_DELETE_FAILED = "delete_failed"
    44  )
    45  
    46  var (
    47  	ALL_NETWORK_TYPES = []string{
    48  		NETWORK_TYPE_GUEST,
    49  		NETWORK_TYPE_BAREMETAL,
    50  		NETWORK_TYPE_CONTAINER,
    51  		NETWORK_TYPE_PXE,
    52  		NETWORK_TYPE_IPMI,
    53  		NETWORK_TYPE_EIP,
    54  	}
    55  
    56  	REGIONAL_NETWORK_PROVIDERS = []string{
    57  		CLOUD_PROVIDER_HUAWEI,
    58  		CLOUD_PROVIDER_HCSO,
    59  		CLOUD_PROVIDER_HCS,
    60  		CLOUD_PROVIDER_CTYUN,
    61  		CLOUD_PROVIDER_UCLOUD,
    62  		CLOUD_PROVIDER_GOOGLE,
    63  		CLOUD_PROVIDER_OPENSTACK,
    64  		CLOUD_PROVIDER_JDCLOUD,
    65  	}
    66  )