yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/apis/compute/elasticips_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  	EIP_MODE_INSTANCE_PUBLICIP = "public_ip"
    19  	EIP_MODE_STANDALONE_EIP    = "elastic_ip"
    20  
    21  	EIP_ASSOCIATE_TYPE_SERVER       = "server"
    22  	EIP_ASSOCIATE_TYPE_NAT_GATEWAY  = "natgateway"
    23  	EIP_ASSOCIATE_TYPE_LOADBALANCER = "loadbalancer"
    24  	EIP_ASSOCIATE_TYPE_UNKNOWN      = "unknown"
    25  
    26  	EIP_ASSOCIATE_TYPE_INSTANCE_GROUP = "instancegroup"
    27  
    28  	EIP_STATUS_READY           = "ready"
    29  	EIP_STATUS_UNKNOWN         = "unknown"
    30  	EIP_STATUS_ALLOCATE        = "allocate"
    31  	EIP_STATUS_ALLOCATE_FAIL   = "allocate_fail"
    32  	EIP_STATUS_DEALLOCATE      = "deallocate"
    33  	EIP_STATUS_DEALLOCATE_FAIL = "deallocate_fail"
    34  	EIP_STATUS_ASSOCIATE       = "associate"
    35  	EIP_STATUS_ASSOCIATE_FAIL  = "associate_fail"
    36  	EIP_STATUS_DISSOCIATE      = "dissociate"
    37  	EIP_STATUS_DISSOCIATE_FAIL = "dissociate_fail"
    38  
    39  	EIP_STATUS_CHANGE_BANDWIDTH = "change_bandwidth"
    40  
    41  	EIP_CHARGE_TYPE_BY_TRAFFIC   = "traffic"
    42  	EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
    43  
    44  	INSTANCE_ASSOCIATE_EIP         = "associate_eip"
    45  	INSTANCE_ASSOCIATE_EIP_FAILED  = "associate_eip_failed"
    46  	INSTANCE_DISSOCIATE_EIP        = "dissociate_eip"
    47  	INSTANCE_DISSOCIATE_EIP_FAILED = "dissociate_eip_failed"
    48  )
    49  
    50  var (
    51  	EIP_ASSOCIATE_VALID_TYPES = []string{
    52  		EIP_ASSOCIATE_TYPE_SERVER,
    53  		EIP_ASSOCIATE_TYPE_NAT_GATEWAY,
    54  		EIP_ASSOCIATE_TYPE_INSTANCE_GROUP,
    55  		EIP_ASSOCIATE_TYPE_LOADBALANCER,
    56  	}
    57  )