Skip to content

Commit 5ede0d7

Browse files
committed
fix: fixed the VNFD creation in a basic way
It seems that the remnants of the VNFD and NSD creation and indeed unusable and ugly. Started to rework them
1 parent e6e4da1 commit 5ede0d7

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ buildSrc/build
3030
/spring-*/build
3131
/src/asciidoc/build
3232
target/*
33-
33+
src/main/resources/static/.vscode
3434
# Eclipse artifacts, including WTP generated manifests
3535
.classpath
3636
.project

src/main/resources/static/descriptors/vnfd/vdu.json

-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22
"vm_image":[
33
"ubuntu-14.04-server-cloudimg-amd64-disk1"
44
],
5-
"computation_requirement":"",
6-
"virtual_memory_resource_element":"1024",
7-
"virtual_network_bandwidth_resource":"1000000",
85
"lifecycle_event":[
96
],
10-
"vimInstanceName":"vim-instance",
11-
"vdu_constraint":"",
12-
"high_availability":"ACTIVE_PASSIVE",
137
"scale_in_out":3,
148
"vnfc":[
159
{

src/main/resources/static/js/controllers/vnfdController.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ var app = angular.module('app').controller('VnfdCtrl', function ($scope, $compil
6262
$scope.vnfdCreate.vdu.splice($scope.vduEditIndex, 1);
6363
delete $scope.vduEditIndex;
6464
}
65+
$scope.vduCreate.vimInstanceName = [];
6566
$scope.vnfdCreate.vdu.push(angular.copy($scope.vduCreate));
6667
};
6768
$scope.storeDepFlavour = function () {
@@ -73,18 +74,19 @@ var app = angular.module('app').controller('VnfdCtrl', function ($scope, $compil
7374
$scope.vnfdCreate.deployment_flavour.push(angular.copy($scope.depFlavor));
7475
};
7576

76-
$scope.selection = [];
77+
$scope.selectionImage = [];
7778

7879
$scope.toggleSelection = function toggleSelection(image) {
79-
var idx = $scope.selection.indexOf(image);
80+
console.log(({}).toString.call($scope.selection).match(/\s([a-zA-Z]+)/)[1].toLowerCase())
81+
var idx = $scope.selectionImage.indexOf(image);
8082
if (idx > -1) {
81-
$scope.selection.splice(idx, 1);
83+
$scope.selectionImage.splice(idx, 1);
8284
}
8385
else {
84-
$scope.selection.push(image);
86+
$scope.selectionImage.push(image);
8587
}
86-
console.log($scope.selection);
87-
$scope.vduCreate.vm_image = $scope.selection;
88+
console.log($scope.selectionImage);
89+
$scope.vduCreate.vm_image = $scope.selectionImage;
8890
};
8991

9092
$scope.sendVNFD = function () {

0 commit comments

Comments
 (0)