Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 1213fb0

Browse files
committed
VNF Provisioning with Puma. NSD refactor
1 parent 26e7797 commit 1213fb0

File tree

22 files changed

+994
-682
lines changed

22 files changed

+994
-682
lines changed

ns-provisioning/main.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
require 'sinatra/config_file'
2323
require 'yaml'
2424
require 'logstash-logger'
25-
require 'eventmachine'
2625

2726
# Require the bundler gem and then call Bundler.require to load in all gems
2827
# listed in Gemfile.

nsd-validator/.yardoc/checksums

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
main.rb dba3d7a12fffcf3778ad49bba913d41253c0e82a
2-
helpers/nsd.rb 5463ddd13802774225caadb7b000465af12d8acb
3-
routes/nsd.rb 35e8810fcada11c6e0c7af965f230d28796c39e3

nsd-validator/.yardoc/complete

Whitespace-only changes.

nsd-validator/.yardoc/object_types

-259 Bytes
Binary file not shown.
-9.96 KB
Binary file not shown.
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{"nsd":{
2+
"id": "5700000000b0356a4e00001",
3+
"name": "test_netfloc",
4+
"vendor": "1",
5+
"version": "1",
6+
"vnfds": [
7+
"70150", "70151"
8+
],
9+
"vnffgd": {
10+
"vnffgs": [
11+
{
12+
"vnffg_id": "vnffg0",
13+
"number_of_endpoints": 1,
14+
"number_of_virtual_links": 1,
15+
"dependent_virtual_links": [
16+
"vld1"
17+
],
18+
"network_forwarding_path": [
19+
{
20+
"nfp_id": "nfp0",
21+
"graph": [
22+
"vld0",
23+
"vld1"
24+
],
25+
"connection_points": [
26+
"ns_ext_data_in",
27+
"VNF#70150:ext_management",
28+
"VNF#70151:ext_management2",
29+
"ns_ext_data_in"
30+
],
31+
"constituent_vnfs": [
32+
{
33+
"vnf_ref_id": "70150",
34+
"vnf_flavor_key_ref": "gold"
35+
},
36+
{
37+
"vnf_ref_id": "70151",
38+
"vnf_flavor_key_ref": "gold"
39+
}
40+
]
41+
}
42+
]
43+
}
44+
]
45+
},
46+
"lifecycle_events": {
47+
"start": [
48+
{
49+
"vnf_id": "70150",
50+
"vnf_event": "start",
51+
"event_rel_id": "rel_le0",
52+
"event_id": "le0",
53+
"sla_ref_id": "sla0"
54+
},
55+
{
56+
"vnf_id": "70151",
57+
"vnf_event": "start",
58+
"event_rel_id": "rel_le0",
59+
"event_id": "le0",
60+
"sla_ref_id": "sla0"
61+
}
62+
],
63+
"stop": [],
64+
"scale_out": [],
65+
"scale_in": []
66+
},
67+
"vnf_depedency": [],
68+
"monitoring_parameters": [
69+
],
70+
"vld": {
71+
"number_of_endpoints": 0,
72+
"virtual_links": [
73+
{
74+
"vld_id": "vld0",
75+
"alias": "management",
76+
"root_requirements": "Unlimited",
77+
"leaf_requirement": "Unlimited",
78+
"qos": {
79+
"average": "",
80+
"peak": "",
81+
"burst": ""
82+
},
83+
"connections": [
84+
"VNF#5976:ext_management"
85+
],
86+
"connectivity_type": "E-LINE",
87+
"external_access": true,
88+
"merge": true,
89+
"sla_ref_id": "sla0"
90+
},
91+
{
92+
"vld_id": "vld1",
93+
"alias": "management2",
94+
"root_requirements": "Unlimited",
95+
"leaf_requirement": "Unlimited",
96+
"qos": {
97+
"average": "",
98+
"peak": "",
99+
"burst": ""
100+
},
101+
"connections": [
102+
"VNF#5976:ext_management2"
103+
],
104+
"connectivity_type": "E-LINE",
105+
"external_access": true,
106+
"merge": true,
107+
"sla_ref_id": "sla0"
108+
}
109+
]
110+
},
111+
"sla": [
112+
{
113+
"id": "sla0",
114+
"assurance_parameters": [
115+
{
116+
"formula": "MAX(VNF:5976.cpu_util)",
117+
"id": "cpu_util",
118+
"name": "cpu_util",
119+
"penalty": {
120+
"type": "Discount",
121+
"unit": "%",
122+
"validity": "P1D",
123+
"value": 1
124+
},
125+
"unit": "%",
126+
"value": "LE(10)",
127+
"violations": [
128+
{
129+
"breaches_count": 2,
130+
"interval": 60
131+
}
132+
]
133+
}
134+
],
135+
"billing": {
136+
"model": "PAYG",
137+
"price": {
138+
"price_per_period": 1,
139+
"setup": 4,
140+
"unit": "EUR"
141+
}
142+
},
143+
"constituent_vnf": [
144+
{
145+
"number_of_instances": 1,
146+
"redundancy_model": "Active",
147+
"vnf_flavour_id_reference": "gold",
148+
"vnf_reference": "5976"
149+
}
150+
],
151+
"sla_key": "basic"
152+
}
153+
],
154+
"auto_scale_policy": {
155+
"criteria": []
156+
},
157+
"connection_points": [],
158+
"vnf_dependency": [],
159+
"provider": "T-Nova",
160+
"description": "test nsd",
161+
"provider_id": "1",
162+
"descriptor_version": "1"
163+
}
164+
}

nsd-validator/assets/samples/nsd_scale_example.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{"nsd":{
2-
"id": "578e2db5e4b0356a4eb0d2b1",
3-
"name": "testnsd",
2+
"id": "578e2db5e4b0356a4eb3d2b1",
3+
"name": "test_scaling_vtu",
44
"vendor": "1",
55
"version": "1",
66
"vnfds": [
7-
"5966"
7+
"5976"
88
],
99
"vnffgd": {
1010
"vnffgs": [
@@ -23,11 +23,11 @@
2323
],
2424
"connection_points": [
2525
"ns_ext_data_in",
26-
"VNF#5966:ext_data"
26+
"VNF#5976:ext_data"
2727
],
2828
"constituent_vnfs": [
2929
{
30-
"vnf_ref_id": "5966",
30+
"vnf_ref_id": "5976",
3131
"vnf_flavor_key_ref": "gold"
3232
}
3333
]
@@ -39,7 +39,7 @@
3939
"lifecycle_events": {
4040
"start": [
4141
{
42-
"vnf_id": "5966",
42+
"vnf_id": "5976",
4343
"vnf_event": "start",
4444
"event_rel_id": "rel_le0",
4545
"event_id": "le0",
@@ -72,7 +72,7 @@
7272
"burst": ""
7373
},
7474
"connections": [
75-
"VNF#5966:ext_management"
75+
"VNF#5976:ext_management"
7676
],
7777
"connectivity_type": "E-LINE",
7878
"external_access": true,
@@ -90,7 +90,7 @@
9090
"burst": ""
9191
},
9292
"connections": [
93-
"VNF#5966:ext_data"
93+
"VNF#5976:ext_data"
9494
],
9595
"connectivity_type": "E-LINE",
9696
"external_access": true,
@@ -104,7 +104,7 @@
104104
"id": "sla0",
105105
"assurance_parameters": [
106106
{
107-
"formula": "MAX(VNF:5966.cpu_util)",
107+
"formula": "MAX(VNF:5976.cpu_util)",
108108
"id": "cpu_util",
109109
"name": "cpu_util",
110110
"penalty": {
@@ -136,7 +136,7 @@
136136
"number_of_instances": 1,
137137
"redundancy_model": "Active",
138138
"vnf_flavour_id_reference": "gold",
139-
"vnf_reference": "5966"
139+
"vnf_reference": "5976"
140140
}
141141
],
142142
"sla_key": "basic"

nsd-validator/config.ru

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ require ::File.join(root, 'main')
33
require 'sinatra/gk_auth'
44

55
run NsdValidator.new
6+
7+
map('/nsds') { run Validator }

nsd-validator/doc/_index.html

Lines changed: 29 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html>
43
<head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>
7-
Documentation by YARD 0.8.7.6
7+
Documentation by YARD 0.9.5
88

99
</title>
1010

@@ -13,9 +13,8 @@
1313
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
1414

1515
<script type="text/javascript" charset="utf-8">
16-
hasFrames = window.top.frames.main ? true : false;
16+
pathId = null;
1717
relpath = '';
18-
framesUrl = "frames.html#!_index.html";
1918
</script>
2019

2120

@@ -26,37 +25,36 @@
2625

2726
</head>
2827
<body>
29-
<div id="header">
30-
<div id="menu">
31-
28+
<div class="nav_wrap">
29+
<iframe id="nav" src="class_list.html"></iframe>
30+
<div id="resizer"></div>
31+
</div>
3232

33-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33+
<div id="main" tabindex="-1">
34+
<div id="header">
35+
<div id="menu">
36+
3437
</div>
3538

36-
<div id="search">
39+
<div id="search">
3740

3841
<a class="full_list_link" id="class_list_link"
3942
href="class_list.html">
40-
Class List
41-
</a>
42-
43-
<a class="full_list_link" id="method_list_link"
44-
href="method_list.html">
45-
Method List
46-
</a>
47-
48-
<a class="full_list_link" id="file_list_link"
49-
href="file_list.html">
50-
File List
43+
44+
<svg width="24" height="24">
45+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
46+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
47+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
48+
</svg>
5149
</a>
5250

5351
</div>
54-
<div class="clear"></div>
55-
</div>
52+
<div class="clear"></div>
53+
</div>
5654

57-
<iframe id="search_frame"></iframe>
55+
<iframe id="search_frame" src="class_list.html"></iframe>
5856

59-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.6</h1>
57+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.5</h1>
6058
<div id="listing">
6159
<h1 class="alphaindex">Alphabetic Index</h1>
6260

@@ -79,24 +77,6 @@ <h2>Namespace Listing A-Z</h2>
7977
<tr>
8078
<td valign='top' width="33%">
8179

82-
83-
<ul id="alpha_N" class="alpha">
84-
<li class="letter">N</li>
85-
<ul>
86-
87-
<li>
88-
<span class='object_link'><a href="NsdValidator.html" title="NsdValidator (class)">NsdValidator</a></span>
89-
90-
</li>
91-
92-
<li>
93-
<span class='object_link'><a href="NsdValidatorHelper.html" title="NsdValidatorHelper (module)">NsdValidatorHelper</a></span>
94-
95-
</li>
96-
97-
</ul>
98-
</ul>
99-
10080
</td>
10181
</tr>
10282
</table>
@@ -105,11 +85,12 @@ <h2>Namespace Listing A-Z</h2>
10585

10686
</div>
10787

108-
<div id="footer">
109-
Generated on Tue May 3 11:09:39 2016 by
88+
<div id="footer">
89+
Generated on Fri Sep 23 14:43:01 2016 by
11090
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111-
0.8.7.6 (ruby-2.0.0).
91+
0.9.5 (ruby-2.3.0).
11292
</div>
11393

94+
</div>
11495
</body>
11596
</html>

0 commit comments

Comments
 (0)