yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/remotefile/network.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 remotefile 16 17 import ( 18 api "yunion.io/x/cloudmux/pkg/apis/compute" 19 "yunion.io/x/cloudmux/pkg/cloudprovider" 20 "yunion.io/x/onecloud/pkg/util/rbacutils" 21 ) 22 23 type SNetwork struct { 24 SResourceBase 25 26 wire *SWire 27 WireId string 28 IpStart string 29 IpEnd string 30 IpMask int8 31 Gatway string 32 } 33 34 func (self *SNetwork) GetIWire() cloudprovider.ICloudWire { 35 return self.wire 36 } 37 38 func (self *SNetwork) GetIpStart() string { 39 return self.IpStart 40 } 41 42 func (self *SNetwork) GetIpEnd() string { 43 return self.IpEnd 44 } 45 46 func (self *SNetwork) GetIpMask() int8 { 47 return self.IpMask 48 } 49 50 func (self *SNetwork) GetGateway() string { 51 return self.Gatway 52 } 53 54 func (self *SNetwork) GetServerType() string { 55 return api.NETWORK_TYPE_GUEST 56 } 57 58 func (self *SNetwork) GetPublicScope() rbacutils.TRbacScope { 59 return rbacutils.ScopeDomain 60 } 61 62 func (self *SNetwork) Delete() error { 63 return cloudprovider.ErrNotSupported 64 } 65 66 func (self *SNetwork) GetAllocTimeoutSeconds() int { 67 return 6 68 }