blob: c5f8fde5294db7a8623514657320c1ac107b3746 (
plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
/*-
* ============LICENSE_START==========================================
* OPENECOMP - DCAE
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END============================================
*/
@GenModel(modelDirectory="/ncomp-openstack-model/src/main/xcore-gen")
package org.openecomp.ncomp.openstack.neutron
import org.openecomp.ncomp.openstack.core.OpenStackRequest
annotation "http://openecomp.org/sirius/openstack" as openstack
abstract class NeutronService {
op Network createNetwork(CreateNetworkRequest request)
op Subnet createSubnet(CreateSubnetRequest request)
op Port createPort(CreatePortRequest request)
op Router createRouter(CreateRouterRequest request)
op void deleteNetwork(String projectName, String name)
op void deleteSubnet(String projectName, String name)
op void deletePort(String projectName, String name)
op void deleteRouter(String projectName, String name)
op void associateFloatingIp(String projectName, String ipId, String portId)
}
abstract class NeutronObject {}
class Network extends NeutronObject {
String ^id
String name
Boolean admin_state_up
String provider_network_type
String provider_physical_network
Integer provider_segmentation_id
Boolean router_external
Boolean shared
String status
String[] subnets
String tenant_id
}
class Subnet extends NeutronObject {
String ^id
String name
String status
Boolean admin_state_up
String cidr
contains AllocationPool[] allocation_pools
String[] dns_nameservers
Boolean enable_dhcp
String gateway_ip
String[] host_routes
Integer ip_version
String network_id
String tenant_id
}
class AllocationPool {
String start
String end
}
class Router extends NeutronObject {
String ^id
String name
String status
Boolean admin_state_up
contains ExternalGateway external_gateway_info
String tenant_id
}
class Port extends NeutronObject {
String ^id
String name
String status
Boolean admin_state_up
contains ExternalGateway external_gateway_info
String tenant_id
String[] allowed_address_pairs
String binding_host_id
contains BindingProfile binding_profile
contains BindingVifDetail binding_vif_details
String binding_vif_type
String binding_vnic_type
String device_id
String device_owner
String[] extra_dhcp_opts
contains FixedIp[] fixed_ips
String mac_address
String network_id
String[] security_groups
}
class NeutronSecurityGroup extends NeutronObject {
String ^id
String name
String description
contains NeutronSecurityRule[] security_group_rules
String tenant_id
}
class NeutronSecurityRule extends NeutronObject {
String ^id
String direction
String ethertype
Integer port_range_min
Integer port_range_max
String protocol
String remote_group_id
String remote_ip_prefix
String security_group_id
String tenant_id
}
class NeutronFloatingIp extends NeutronObject {
String ^id
String name
String status
String floating_network_id
String router_id
String fixed_ip_address
String floating_ip_address
String tenant_id
String port_id
}
class BindingProfile {
}
class BindingVifDetail {
Boolean ovs_hybrid_plug
Boolean port_filter
}
class FixedIp {
String ip_address
String subnet_id
}
class ExternalGateway {
Boolean enable_snat
String network_id
}
abstract class NeutronRequest extends OpenStackRequest {
}
class CreateNetworkRequest extends NeutronRequest {
String name
@openstack(name="provider:network_type")
String providerNetworkType
@openstack(name="provider:physical_network")
String providerPhysicalNetwork
@openstack(name="provider:segmentation_id")
int providerSegmentationId
Boolean admin_state_up
Boolean shared
}
class CreateSubnetRequest extends NeutronRequest {
String name
String[1] network_id
int ip_version
String cidr
contains AllocationPool[] allocation_pools
String[] dns_nameservers
Boolean enable_dhcp
String gateway_ip
}
class CreateRouterRequest extends NeutronRequest {
String name
Boolean admin_state_up
Boolean shared
String externalNetwork
String[] ports
String[] subnets
}
class CreatePortRequest extends NeutronRequest {
String name
@openstack(name="binding:vnic_type")
String bindingVnicType
String status
Boolean admin_state_up
@openstack(removeEmptyList="true")
contains FixedIp[] fixed_ips
String mac_address
String[1] network_id
//String[] security_groups
}
|