mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
parent
0edcc7a7ba
commit
167ab18de7
@ -18,7 +18,7 @@ port: 2616
|
||||
one_xmlrpc: 'http://localhost:2633/RPC2'
|
||||
|
||||
# Flow Server: use it if you have flow-server and fireedge on different servers
|
||||
oneflow_server: 'http://localhost:2472'
|
||||
oneflow_server: 'http://localhost:2474'
|
||||
|
||||
|
||||
|
||||
|
176
src/fireedge/package-lock.json
generated
176
src/fireedge/package-lock.json
generated
@ -85,7 +85,7 @@
|
||||
"socket.io-client": "4.1.2",
|
||||
"speakeasy": "2.0.0",
|
||||
"sprintf-js": "1.1.2",
|
||||
"terser-webpack-plugin": "^5.1.4",
|
||||
"terser-webpack-plugin": "5.1.4",
|
||||
"time-fix-plugin": "2.0.7",
|
||||
"tiny-worker": "2.3.0",
|
||||
"upcast": "4.0.0",
|
||||
@ -204,11 +204,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.14.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
|
||||
"integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.8.tgz",
|
||||
"integrity": "sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg==",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.14.5",
|
||||
"@babel/types": "^7.14.8",
|
||||
"jsesc": "^2.5.1",
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
@ -265,13 +265,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-create-class-features-plugin": {
|
||||
"version": "7.14.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz",
|
||||
"integrity": "sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.8.tgz",
|
||||
"integrity": "sha512-bpYvH8zJBWzeqi1o+co8qOrw+EXzQ/0c74gVmY205AWXy9nifHrOg77y+1zwxX5lXE7Icq4sPlSQ4O2kWBrteQ==",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.14.5",
|
||||
"@babel/helper-function-name": "^7.14.5",
|
||||
"@babel/helper-member-expression-to-functions": "^7.14.5",
|
||||
"@babel/helper-member-expression-to-functions": "^7.14.7",
|
||||
"@babel/helper-optimise-call-expression": "^7.14.5",
|
||||
"@babel/helper-replace-supers": "^7.14.5",
|
||||
"@babel/helper-split-export-declaration": "^7.14.5"
|
||||
@ -367,18 +367,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-transforms": {
|
||||
"version": "7.14.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz",
|
||||
"integrity": "sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz",
|
||||
"integrity": "sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA==",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.14.5",
|
||||
"@babel/helper-replace-supers": "^7.14.5",
|
||||
"@babel/helper-simple-access": "^7.14.5",
|
||||
"@babel/helper-simple-access": "^7.14.8",
|
||||
"@babel/helper-split-export-declaration": "^7.14.5",
|
||||
"@babel/helper-validator-identifier": "^7.14.5",
|
||||
"@babel/helper-validator-identifier": "^7.14.8",
|
||||
"@babel/template": "^7.14.5",
|
||||
"@babel/traverse": "^7.14.5",
|
||||
"@babel/types": "^7.14.5"
|
||||
"@babel/traverse": "^7.14.8",
|
||||
"@babel/types": "^7.14.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -431,11 +431,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-simple-access": {
|
||||
"version": "7.14.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz",
|
||||
"integrity": "sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz",
|
||||
"integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.14.5"
|
||||
"@babel/types": "^7.14.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -464,9 +464,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.14.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
|
||||
"integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz",
|
||||
"integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
@ -494,13 +494,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.14.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
|
||||
"integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.8.tgz",
|
||||
"integrity": "sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw==",
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.14.5",
|
||||
"@babel/traverse": "^7.14.5",
|
||||
"@babel/types": "^7.14.5"
|
||||
"@babel/traverse": "^7.14.8",
|
||||
"@babel/types": "^7.14.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -540,9 +540,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.14.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
|
||||
"integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.8.tgz",
|
||||
"integrity": "sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA==",
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@ -1543,9 +1543,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.14.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz",
|
||||
"integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.8.tgz",
|
||||
"integrity": "sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
},
|
||||
@ -1567,17 +1567,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.14.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
|
||||
"integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.8.tgz",
|
||||
"integrity": "sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg==",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.14.5",
|
||||
"@babel/generator": "^7.14.5",
|
||||
"@babel/generator": "^7.14.8",
|
||||
"@babel/helper-function-name": "^7.14.5",
|
||||
"@babel/helper-hoist-variables": "^7.14.5",
|
||||
"@babel/helper-split-export-declaration": "^7.14.5",
|
||||
"@babel/parser": "^7.14.7",
|
||||
"@babel/types": "^7.14.5",
|
||||
"@babel/parser": "^7.14.8",
|
||||
"@babel/types": "^7.14.8",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@ -1586,11 +1586,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.14.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
|
||||
"integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
|
||||
"version": "7.14.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.8.tgz",
|
||||
"integrity": "sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q==",
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.14.5",
|
||||
"@babel/helper-validator-identifier": "^7.14.8",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -2057,9 +2057,9 @@
|
||||
"integrity": "sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.3.2.tgz",
|
||||
"integrity": "sha512-jJs9ErFLP403I+hMLGnqDRWT0RYKSvArxuBVh2veudHV7ifEC1WAmjJADacZ7mRbA2nWgHtn8xyECMAot0SkAw=="
|
||||
"version": "16.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.1.tgz",
|
||||
"integrity": "sha512-UW7cbLqf/Wu5XH2RKKY1cHwUNLicIDRLMraYKz+HHAerJ0ZffUEk+fMnd8qU2JaS6cAy0r8tsaf7yqHASf/Y0Q=="
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.4",
|
||||
@ -2067,9 +2067,9 @@
|
||||
"integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ=="
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "17.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz",
|
||||
"integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==",
|
||||
"version": "17.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz",
|
||||
"integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==",
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"@types/scheduler": "*",
|
||||
@ -3200,9 +3200,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001245",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz",
|
||||
"integrity": "sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA==",
|
||||
"version": "1.0.30001247",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001247.tgz",
|
||||
"integrity": "sha512-4rS7co+7+AoOSPRPOPUt5/GdaqZc0EsUpWk66ofE3HJTAajUK2Ss2VwoNzVN69ghg8lYYlh0an0Iy4LIHHo9UQ==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
@ -3761,9 +3761,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/copy-webpack-plugin/node_modules/glob-parent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.0.tgz",
|
||||
"integrity": "sha512-Hdd4287VEJcZXUwv1l8a+vXC1GjOQqXe+VS30w/ypihpcnu9M1n3xeYeJu5CBpeEQj2nAab2xxz28GuA3vp4Ww==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.1.tgz",
|
||||
"integrity": "sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog==",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
@ -3772,11 +3772,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/copy-webpack-plugin/node_modules/schema-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.7",
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
@ -4273,9 +4273,9 @@
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.3.775",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.775.tgz",
|
||||
"integrity": "sha512-EGuiJW4yBPOTj2NtWGZcX93ZE8IGj33HJAx4d3ouE2zOfW2trbWU+t1e0yzLr1qQIw81++txbM3BH52QwSRE6Q=="
|
||||
"version": "1.3.786",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.786.tgz",
|
||||
"integrity": "sha512-AmvbLBj3hepRk8v/DHrFF8gINxOFfDbrn6Ts3PcK46/FBdQb5OMmpamSpZQXSkfi77FfBzYtQtAk+00LCLYMVw=="
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
"version": "6.5.4",
|
||||
@ -9399,9 +9399,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz",
|
||||
"integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==",
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
|
||||
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
|
||||
"dependencies": {
|
||||
"resolve": "^1.9.0"
|
||||
},
|
||||
@ -9454,9 +9454,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.13.7",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
|
||||
"version": "0.13.9",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
|
||||
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
|
||||
},
|
||||
"node_modules/regenerator-transform": {
|
||||
"version": "0.14.5",
|
||||
@ -10803,11 +10803,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser-webpack-plugin/node_modules/schema-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.7",
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
@ -11484,12 +11484,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/schema-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.7",
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
@ -11552,9 +11552,9 @@
|
||||
"integrity": "sha512-aHdl/y2N7PW2Sx7K+r3AxpJO+aDMcYzMQd60Qxefq3+EwhewSbTBqNumOsCE1JsCUNoyfGj5465N0sSf6hc/5w=="
|
||||
},
|
||||
"node_modules/webpack-sources": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz",
|
||||
"integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz",
|
||||
"integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==",
|
||||
"dependencies": {
|
||||
"source-list-map": "^2.0.1",
|
||||
"source-map": "^0.6.1"
|
||||
@ -11595,11 +11595,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack/node_modules/schema-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.7",
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
@ -11792,11 +11792,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/worker-loader/node_modules/schema-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.7",
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
|
@ -55,7 +55,7 @@ const parseToNumber = validate =>
|
||||
* @param {Function} success - callback success function
|
||||
* @param {Function} error - callback error function
|
||||
*/
|
||||
const oneFlowConection = (requestData = {}, success = () => undefined, error = () => undefined) => {
|
||||
const oneFlowConnection = (requestData = {}, success = () => undefined, error = () => undefined) => {
|
||||
const { method, path, user, password, request, post } = requestData
|
||||
const optionMethod = method || GET
|
||||
const optionPath = path || '/'
|
||||
@ -103,7 +103,7 @@ const oneFlowConection = (requestData = {}, success = () => undefined, error = (
|
||||
}
|
||||
|
||||
const functionRoutes = {
|
||||
oneFlowConection,
|
||||
oneFlowConnection,
|
||||
returnSchemaError
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
const { Validator } = require('jsonschema')
|
||||
const { action } = require('./schemas')
|
||||
const { oneFlowConection } = require('./functions')
|
||||
const { oneFlowConnection } = require('./functions')
|
||||
const { httpMethod, defaultEmptyFunction } = require('server/utils/constants/defaults')
|
||||
const { httpResponse, parsePostData } = require('server/utils/server')
|
||||
const {
|
||||
@ -25,6 +25,8 @@ const {
|
||||
methodNotAllowed
|
||||
} = require('server/utils/constants/http-codes')
|
||||
const { returnSchemaError } = require('./functions')
|
||||
const { generateNewResourceTemplate } = require('server/utils/opennebula')
|
||||
const { Actions: ActionVM } = require('server/utils/constants/commands/vm')
|
||||
const { GET, POST, DELETE } = httpMethod
|
||||
|
||||
/**
|
||||
@ -70,9 +72,9 @@ const service = (res = {}, next = defaultEmptyFunction, params = {}, userData =
|
||||
if (params && params.id) {
|
||||
config.path = '/service/{0}'
|
||||
config.request = params.id
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
} else {
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -89,7 +91,7 @@ const serviceDelete = (res = {}, next = defaultEmptyFunction, params = {}, userD
|
||||
const { user, password } = userData
|
||||
if (params && params.id && user && password) {
|
||||
const config = { method: DELETE, path: '/service/{0}', user, password, request: params.id }
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
methodNotAllowed,
|
||||
@ -123,7 +125,7 @@ const serviceAddAction = (res = {}, next = defaultEmptyFunction, params = {}, us
|
||||
request: params.id,
|
||||
post: postAction
|
||||
}
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
internalServerError,
|
||||
@ -165,7 +167,7 @@ const serviceAddScale = (res = {}, next = defaultEmptyFunction, params = {}, use
|
||||
request: params.id,
|
||||
post: postAction
|
||||
}
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
internalServerError,
|
||||
@ -207,7 +209,7 @@ const serviceAddRoleAction = (res = {}, next = defaultEmptyFunction, params = {}
|
||||
request: [params.role, params.id],
|
||||
post: postAction
|
||||
}
|
||||
oneFlowConection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
oneFlowConnection(config, data => success(next, res, data), data => error(next, res, data))
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
internalServerError,
|
||||
@ -226,11 +228,214 @@ const serviceAddRoleAction = (res = {}, next = defaultEmptyFunction, params = {}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get service info.
|
||||
*
|
||||
* @param {string} user - username
|
||||
* @param {string} password - password
|
||||
* @param {string} serviceID - service ID
|
||||
* @param {Function} success - callback when have service info data
|
||||
* @param {Function} error - callback when no have service info data
|
||||
*/
|
||||
const getNodesService = (user = '', password = '', serviceID = 0, success = defaultEmptyFunction, error = defaultEmptyFunction) => {
|
||||
if (user && password && serviceID) {
|
||||
const config = { method: GET, path: '/service/{0}', user, password, request: serviceID }
|
||||
oneFlowConnection(
|
||||
config,
|
||||
(serviceData = {}) => {
|
||||
const vms = []
|
||||
if (serviceData && serviceData.DOCUMENT && serviceData.DOCUMENT.TEMPLATE && serviceData.DOCUMENT.TEMPLATE.BODY && serviceData.DOCUMENT.TEMPLATE.BODY.roles) {
|
||||
let roles = serviceData.DOCUMENT.TEMPLATE.BODY.roles
|
||||
roles = Array.isArray(roles) ? roles : [roles]
|
||||
roles.forEach(role => {
|
||||
if (role && role.nodes) {
|
||||
let nodes = role.nodes
|
||||
nodes = Array.isArray(nodes) ? nodes : [nodes]
|
||||
const filteredNodes = nodes.filter(node => node && node.deploy_id >= 0)
|
||||
vms.push(...filteredNodes)
|
||||
}
|
||||
})
|
||||
}
|
||||
vms.forEach((vm = {}, index) => {
|
||||
success(vm, vms.length, index + 1)
|
||||
})
|
||||
},
|
||||
error
|
||||
)
|
||||
} else {
|
||||
error()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse schedule action to string.
|
||||
*
|
||||
* @param {string} schedAction - schedule action to parse
|
||||
* @returns {string} scheduleAction
|
||||
*/
|
||||
const parseSchedActionsToString = (schedAction = '') => {
|
||||
const wrapper = 'SCHED_ACTION=[%1$s]'
|
||||
let rtn = ''
|
||||
try {
|
||||
const parsedSchedAction = JSON.parse(schedAction)
|
||||
if (Array.isArray(parsedSchedAction)) {
|
||||
rtn = parsedSchedAction.map(action => generateNewResourceTemplate({}, action, [], wrapper)).join(' ')
|
||||
} else if (typeof parsedSchedAction === 'object') {
|
||||
rtn = generateNewResourceTemplate({}, parsedSchedAction, [], wrapper)
|
||||
} else {
|
||||
rtn = schedAction
|
||||
}
|
||||
} catch (err) {
|
||||
rtn = schedAction
|
||||
}
|
||||
return rtn
|
||||
}
|
||||
|
||||
/**
|
||||
* Add schedule action in service.
|
||||
*
|
||||
* @param {object} res - http response
|
||||
* @param {Function} next - express stepper
|
||||
* @param {object} params - params
|
||||
* @param {object} userData - user data
|
||||
* @param {Function} oneConnection - xmlrpc connection
|
||||
*/
|
||||
const serviceAddSchedAction = (res = {}, next = defaultEmptyFunction, params = {}, userData = {}, oneConnection = defaultEmptyFunction) => {
|
||||
const { user, password } = userData
|
||||
if (params && params.id && params.sched_action && user && password) {
|
||||
const schedTemplate = parseSchedActionsToString(params.sched_action)
|
||||
const nodesUpdated = []
|
||||
getNodesService(
|
||||
user,
|
||||
password,
|
||||
params.id,
|
||||
(node = {}, nodesLength, index) => {
|
||||
const oneConnect = oneConnection(user, password)
|
||||
oneConnect(
|
||||
ActionVM.VM_SCHED_ADD,
|
||||
[node.deploy_id, schedTemplate],
|
||||
(err, value) => {
|
||||
if (!err && !isNaN(value)) {
|
||||
nodesUpdated.push(node.deploy_id)
|
||||
}
|
||||
if (nodesLength === index) {
|
||||
success(next, res, nodesUpdated)
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
},
|
||||
(data = '') => error(next, res, data)
|
||||
)
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
methodNotAllowed,
|
||||
'',
|
||||
'invalid id service or sched_action template'
|
||||
)
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schedule action in template.
|
||||
*
|
||||
* @param {object} res - http response
|
||||
* @param {Function} next - express stepper
|
||||
* @param {object} params - params
|
||||
* @param {object} userData - user data
|
||||
* @param {Function} oneConnection - xmlrpc connection
|
||||
*/
|
||||
const serviceUpdateSchedAction = (res = {}, next = defaultEmptyFunction, params = {}, userData = {}, oneConnection = defaultEmptyFunction) => {
|
||||
const { user, password } = userData
|
||||
if (params && params.id && params.id_sched && params.sched_action && user && password) {
|
||||
const schedTemplate = parseSchedActionsToString(params.sched_action)
|
||||
const nodesUpdated = []
|
||||
getNodesService(
|
||||
user,
|
||||
password,
|
||||
params.id,
|
||||
(node = {}, nodesLength, index) => {
|
||||
const oneConnect = oneConnection(user, password)
|
||||
oneConnect(
|
||||
ActionVM.VM_SCHED_UPDATE,
|
||||
[node.deploy_id, parseInt(params.id_sched, 10), schedTemplate],
|
||||
(err, value) => {
|
||||
if (!err && !isNaN(value)) {
|
||||
nodesUpdated.push(node.deploy_id)
|
||||
}
|
||||
if (nodesLength === index) {
|
||||
success(next, res, nodesUpdated)
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
},
|
||||
(data = '') => error(next, res, data)
|
||||
)
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
methodNotAllowed,
|
||||
'',
|
||||
'invalid id service, id sched action or sched_action template'
|
||||
)
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Schedule action in template.
|
||||
*
|
||||
* @param {object} res - http response
|
||||
* @param {Function} next - express stepper
|
||||
* @param {object} params - params
|
||||
* @param {object} userData - user data
|
||||
* @param {Function} oneConnection - xmlrpc connection
|
||||
*/
|
||||
const serviceDeleteSchedAction = (res = {}, next = defaultEmptyFunction, params = {}, userData = {}, oneConnection = defaultEmptyFunction) => {
|
||||
const { user, password } = userData
|
||||
if (params && params.id && params.id_sched && user && password) {
|
||||
const nodesUpdated = []
|
||||
getNodesService(
|
||||
user,
|
||||
password,
|
||||
params.id,
|
||||
(node = {}, nodesLength, index) => {
|
||||
const oneConnect = oneConnection(user, password)
|
||||
oneConnect(
|
||||
ActionVM.VM_SCHED_DELETE,
|
||||
[node.deploy_id, parseInt(params.id_sched, 10)],
|
||||
(err, value) => {
|
||||
if (!err && !isNaN(value)) {
|
||||
nodesUpdated.push(node.deploy_id)
|
||||
}
|
||||
if (nodesLength === index) {
|
||||
success(next, res, nodesUpdated)
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
},
|
||||
(data = '') => error(next, res, data)
|
||||
)
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(
|
||||
methodNotAllowed,
|
||||
'',
|
||||
'invalid id service or id sched action'
|
||||
)
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
const serviceApi = {
|
||||
service,
|
||||
serviceDelete,
|
||||
serviceAddAction,
|
||||
serviceAddScale,
|
||||
serviceAddRoleAction
|
||||
serviceAddRoleAction,
|
||||
serviceAddSchedAction,
|
||||
serviceUpdateSchedAction,
|
||||
serviceDeleteSchedAction
|
||||
}
|
||||
module.exports = serviceApi
|
||||
|
@ -20,16 +20,19 @@ const {
|
||||
serviceDelete,
|
||||
serviceAddAction,
|
||||
serviceAddScale,
|
||||
serviceAddRoleAction
|
||||
serviceAddRoleAction,
|
||||
serviceAddSchedAction,
|
||||
serviceUpdateSchedAction,
|
||||
serviceDeleteSchedAction
|
||||
} = require('./service-functions')
|
||||
const { GET, POST, DELETE } = httpMethod
|
||||
const { GET, POST, DELETE, PUT } = httpMethod
|
||||
|
||||
const routes = {
|
||||
[GET]: {
|
||||
list: {
|
||||
action: service,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id', front: true }
|
||||
id: { from: fromData.resource, name: 'id' }
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -38,22 +41,39 @@ const routes = {
|
||||
action: serviceAddAction,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id' },
|
||||
action: { from: fromData.postBody, front: true }
|
||||
action: { from: fromData.postBody }
|
||||
}
|
||||
},
|
||||
scale: {
|
||||
action: serviceAddScale,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id' },
|
||||
action: { from: fromData.postBody, front: true }
|
||||
action: { from: fromData.postBody }
|
||||
}
|
||||
},
|
||||
'role-action': {
|
||||
action: serviceAddRoleAction,
|
||||
params: {
|
||||
role: { from: fromData.resource, name: 'id', front: true },
|
||||
id: { from: fromData.resource, name: 'id2', front: true },
|
||||
action: { from: fromData.postBody, front: true }
|
||||
role: { from: fromData.resource, name: 'id' },
|
||||
id: { from: fromData.resource, name: 'id2' },
|
||||
action: { from: fromData.postBody }
|
||||
}
|
||||
},
|
||||
sched_action: {
|
||||
action: serviceAddSchedAction,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id' },
|
||||
sched_action: { from: fromData.postBody, name: 'sched_action' }
|
||||
}
|
||||
}
|
||||
},
|
||||
[PUT]: {
|
||||
sched_action: {
|
||||
action: serviceUpdateSchedAction,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id' },
|
||||
id_sched: { from: fromData.resource, name: 'id2' },
|
||||
sched_action: { from: fromData.postBody, name: 'sched_action' }
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -61,6 +81,13 @@ const routes = {
|
||||
delete: {
|
||||
action: serviceDelete,
|
||||
params: { id: { from: fromData.resource, name: 'id', front: true } }
|
||||
},
|
||||
sched_action: {
|
||||
action: serviceDeleteSchedAction,
|
||||
params: {
|
||||
id: { from: fromData.resource, name: 'id' },
|
||||
id_sched: { from: fromData.resource, name: 'id2' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user