Merge branch 'master' of github.com:jermowery/xos into AddVPNService
diff --git a/containers/xos/Dockerfile b/containers/xos/Dockerfile
index 7e9db23..0fd7565 100644
--- a/containers/xos/Dockerfile
+++ b/containers/xos/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04.2
+FROM python:2.7.11
# XXX Workaround for docker bug:
# https://github.com/docker/docker/issues/6345
diff --git a/gui/ngXosLib/README.md b/gui/ngXosLib/README.md
deleted file mode 100644
index aabae3e..0000000
--- a/gui/ngXosLib/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# ngXosLib
-
-A collection of programs to develop Views as Angular SPA.
-
-## Tools
-
-These tools are designed to help develop UIs for XOS. They assume XOS is running on your system at `localhost:9999`. The `xos/configurations/frontend` is normally a sufficient configuration for development.
-
-### Apigen
-
-Usage: `npm run apigen`
-
-This tool generates an angular resource file for each endpoint available in Swagger.
-
->You can generate api related documentation with: `npm run apidoc`. The output is locate in `api/docs`. You can also see a list of available methods through Swagger at `http://localhost:9999/docs/`
-
-### Vendors
-
-XOS comes with a set of common libraries, as listed in `bower.json`:
-- angular
-- angular-route
-- angular-resource
-- angular-cookie
-- ng-lodash
-
-These libraries are served through Django, so they will not be included in your minified vendor file. To add a library and generate a new file (that will override the old one):
-- enter `ngXosLib` folder
-- run `bower install [myPackage] --save`
-- rebuild the file with `gulp vendor`
-
->_NOTE: before adding libraries please discuss it on the devel list to avoid this file becoming huge_
-
-### Helpers
-
-XOS comes with a helper library that is automatically loaded in the Django template.
-
-To use it, add `xos.helpers` to your required modules:
-
-```
-angular.module('xos.myView', [
- 'xos.helpers'
-])
-```
-
-It will automatically add a `token` to all your requests. Eventually you can take advantage of some other services:
-
-- **NoHyperlinks Interceptor**: will add a `?no_hyperlinks=1` to your request, to tell Django to return ids instead of links.
-- **XosApi** wrapper for `/xos` endpoints.
-- **XoslibApi** wrapper for `/xoslib` endpoints.
-- **HpcApi** wrapper for `/hpcapi` endpoints.
-
->_NOTE: for the API related service, check documentation in [Apigen](#apigen) section._
-
-### Yo XOS
-
-We have created a [yeoman](http://yeoman.io/) generator to help to scaffold views.
-
->As it is in an early stage of development you should manually link it to your system. To do this, enter `xos/core/xoslib/ngXosLib/generator-xos` and run `npm link`.
-
-#### To Generate a New View
-
-From `xos/core/xoslib` run `yo xos`. This command creates a new folder with the provided name in: `xos/core/xoslib/ngXosViews` that contain your application.
-
->If you left the View name empty, it should be `xos/core/xoslib/ngXosViews/sampleView`
-
-#### Run a Development Server
-
-In your `view` folder run `npm start`.
-
-_This will install the required dependencies and start a local server with [BrowserSync](http://www.browsersync.io/)_
-
-#### Publish your View
-
-Once your view is done, from your view root folder, run: `npm run build`.
-
-This will build your application and copy files in the appropriate locations to be used by Django.
-
-At this point you can enter: `http://localhost:9999/admin/core/dashboardview/add/` and add your custom view.
-
->_NOTE url field should be `template:xosSampleView`_
-
-#### Install Dependencies in Your app
-
-To install a local dependency, use bower with `--save`. Common modules are saved in `devDependencies` as they already loaded in the Django template.
-
-The `npm start` command watches your dependencies and automatically injects it in your `index.html`.
-
-#### Linting
-
-A styleguide is enforced through [EsLint](http://eslint.org/) and is checked during the build process. We **highly** suggest installing the linter in your editor to have realtime hints.
-
-#### Test
-
-The generator sets up a test environment with a default test.
-To run it execute: `npm test`
-
-## TODO
-
-- Use Angular $resource instead of $http
-- Use ngDoc instead of jsDoc
-- Define styleguide (both visual and js) and if needed define some UI components
diff --git a/gui/.yo-rc.json b/views/.yo-rc.json
similarity index 100%
rename from gui/.yo-rc.json
rename to views/.yo-rc.json
diff --git a/gui/README.md b/views/README.md
similarity index 89%
rename from gui/README.md
rename to views/README.md
index ad147e6..fb0c5bc 100644
--- a/gui/README.md
+++ b/views/README.md
@@ -4,7 +4,7 @@
## Tools
-These tools are designed to help develop a GUI view. They assume XOS is running on your system and responding at: `localhost:9999`. The `xos/configurations/frontend` is normally sufficient for GUI development.
+These tools are designed to help develop a graphical view. They assume XOS is running on your system and responding at: `localhost:9999`. The `xos/configurations/frontend` is normally sufficient for GUI development.
### Apigen
@@ -63,13 +63,13 @@
We have created a [yeoman](http://yeoman.io/) generator to help scaffold views.
->As it is in an early stage of development, you should manually link it to your system. To do this enter `/gui/ngXosLib/generator-xos` and run `npm link`.
+>As it is in an early stage of development, you should manually link it to your system. To do this enter `/views/ngXosLib/generator-xos` and run `npm link`.
#### To Generate a New View
-From `/gui` run `yo xos`. This command will create a new folder with the provided name in `/gui/ngXosViews` that contains your application.
+From `/views` run `yo xos`. This command will create a new folder with the provided name in `/views/ngXosViews` that contains your application.
->If you left View name empty it should be `/gui/ngXosViews/sampleView`
+>If you left View name empty it should be `/views/ngXosViews/sampleView`
#### Run a Development Server
diff --git a/gui/ngXosLib/.bowerrc b/views/ngXosLib/.bowerrc
similarity index 100%
rename from gui/ngXosLib/.bowerrc
rename to views/ngXosLib/.bowerrc
diff --git a/gui/ngXosLib/.gitignore b/views/ngXosLib/.gitignore
similarity index 100%
rename from gui/ngXosLib/.gitignore
rename to views/ngXosLib/.gitignore
diff --git a/gui/ngXosLib/api/.gitignore b/views/ngXosLib/api/.gitignore
similarity index 100%
rename from gui/ngXosLib/api/.gitignore
rename to views/ngXosLib/api/.gitignore
diff --git a/gui/ngXosLib/api/ng-hpcapi.js b/views/ngXosLib/api/ng-hpcapi.js
similarity index 100%
rename from gui/ngXosLib/api/ng-hpcapi.js
rename to views/ngXosLib/api/ng-hpcapi.js
diff --git a/gui/ngXosLib/api/ng-xos.js b/views/ngXosLib/api/ng-xos.js
similarity index 100%
rename from gui/ngXosLib/api/ng-xos.js
rename to views/ngXosLib/api/ng-xos.js
diff --git a/gui/ngXosLib/api/ng-xoslib.js b/views/ngXosLib/api/ng-xoslib.js
similarity index 100%
rename from gui/ngXosLib/api/ng-xoslib.js
rename to views/ngXosLib/api/ng-xoslib.js
diff --git a/gui/ngXosLib/apiTemplates/custom-angular-class.mustache b/views/ngXosLib/apiTemplates/custom-angular-class.mustache
similarity index 100%
rename from gui/ngXosLib/apiTemplates/custom-angular-class.mustache
rename to views/ngXosLib/apiTemplates/custom-angular-class.mustache
diff --git a/gui/ngXosLib/bower.json b/views/ngXosLib/bower.json
similarity index 100%
rename from gui/ngXosLib/bower.json
rename to views/ngXosLib/bower.json
diff --git a/gui/ngXosLib/generator-xos/app/index.js b/views/ngXosLib/generator-xos/app/index.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/index.js
rename to views/ngXosLib/generator-xos/app/index.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/.bowerrc b/views/ngXosLib/generator-xos/app/templates/.bowerrc
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/.bowerrc
rename to views/ngXosLib/generator-xos/app/templates/.bowerrc
diff --git a/gui/ngXosLib/generator-xos/app/templates/.eslintrc b/views/ngXosLib/generator-xos/app/templates/.eslintrc
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/.eslintrc
rename to views/ngXosLib/generator-xos/app/templates/.eslintrc
diff --git a/gui/ngXosLib/generator-xos/app/templates/.gitignore b/views/ngXosLib/generator-xos/app/templates/.gitignore
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/.gitignore
rename to views/ngXosLib/generator-xos/app/templates/.gitignore
diff --git a/gui/ngXosLib/generator-xos/app/templates/bower.json b/views/ngXosLib/generator-xos/app/templates/bower.json
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/bower.json
rename to views/ngXosLib/generator-xos/app/templates/bower.json
diff --git a/gui/ngXosLib/generator-xos/app/templates/env/default.js b/views/ngXosLib/generator-xos/app/templates/env/default.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/env/default.js
rename to views/ngXosLib/generator-xos/app/templates/env/default.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/gulp/build.js b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/gulp/build.js
rename to views/ngXosLib/generator-xos/app/templates/gulp/build.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/gulp/server.js b/views/ngXosLib/generator-xos/app/templates/gulp/server.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/gulp/server.js
rename to views/ngXosLib/generator-xos/app/templates/gulp/server.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/gulpfile.js b/views/ngXosLib/generator-xos/app/templates/gulpfile.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/gulpfile.js
rename to views/ngXosLib/generator-xos/app/templates/gulpfile.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/karma.conf.js b/views/ngXosLib/generator-xos/app/templates/karma.conf.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/karma.conf.js
rename to views/ngXosLib/generator-xos/app/templates/karma.conf.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/package.json b/views/ngXosLib/generator-xos/app/templates/package.json
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/package.json
rename to views/ngXosLib/generator-xos/app/templates/package.json
diff --git a/gui/ngXosLib/generator-xos/app/templates/spec/sample.test.js b/views/ngXosLib/generator-xos/app/templates/spec/sample.test.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/spec/sample.test.js
rename to views/ngXosLib/generator-xos/app/templates/spec/sample.test.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/src/css/dev.css b/views/ngXosLib/generator-xos/app/templates/src/css/dev.css
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/src/css/dev.css
rename to views/ngXosLib/generator-xos/app/templates/src/css/dev.css
diff --git a/gui/ngXosLib/generator-xos/app/templates/src/index.html b/views/ngXosLib/generator-xos/app/templates/src/index.html
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/src/index.html
rename to views/ngXosLib/generator-xos/app/templates/src/index.html
diff --git a/gui/ngXosLib/generator-xos/app/templates/src/js/main.js b/views/ngXosLib/generator-xos/app/templates/src/js/main.js
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/src/js/main.js
rename to views/ngXosLib/generator-xos/app/templates/src/js/main.js
diff --git a/gui/ngXosLib/generator-xos/app/templates/src/templates/users-list.tpl.html b/views/ngXosLib/generator-xos/app/templates/src/templates/users-list.tpl.html
similarity index 100%
rename from gui/ngXosLib/generator-xos/app/templates/src/templates/users-list.tpl.html
rename to views/ngXosLib/generator-xos/app/templates/src/templates/users-list.tpl.html
diff --git a/gui/ngXosLib/generator-xos/package.json b/views/ngXosLib/generator-xos/package.json
similarity index 100%
rename from gui/ngXosLib/generator-xos/package.json
rename to views/ngXosLib/generator-xos/package.json
diff --git a/gui/ngXosLib/gulp/ngXosHelpers.js b/views/ngXosLib/gulp/ngXosHelpers.js
similarity index 100%
rename from gui/ngXosLib/gulp/ngXosHelpers.js
rename to views/ngXosLib/gulp/ngXosHelpers.js
diff --git a/gui/ngXosLib/gulp/ngXosVendor.js b/views/ngXosLib/gulp/ngXosVendor.js
similarity index 100%
rename from gui/ngXosLib/gulp/ngXosVendor.js
rename to views/ngXosLib/gulp/ngXosVendor.js
diff --git a/gui/ngXosLib/gulpfile.js b/views/ngXosLib/gulpfile.js
similarity index 100%
rename from gui/ngXosLib/gulpfile.js
rename to views/ngXosLib/gulpfile.js
diff --git a/gui/ngXosLib/karma.conf.js b/views/ngXosLib/karma.conf.js
similarity index 100%
rename from gui/ngXosLib/karma.conf.js
rename to views/ngXosLib/karma.conf.js
diff --git a/gui/ngXosLib/package.json b/views/ngXosLib/package.json
similarity index 100%
rename from gui/ngXosLib/package.json
rename to views/ngXosLib/package.json
diff --git a/gui/ngXosLib/xos-resource-generator.js b/views/ngXosLib/xos-resource-generator.js
similarity index 100%
rename from gui/ngXosLib/xos-resource-generator.js
rename to views/ngXosLib/xos-resource-generator.js
diff --git a/gui/ngXosLib/xos-swagger-def.js b/views/ngXosLib/xos-swagger-def.js
similarity index 100%
rename from gui/ngXosLib/xos-swagger-def.js
rename to views/ngXosLib/xos-swagger-def.js
diff --git a/gui/ngXosLib/xosHelpers/spec/csrftoken.test.js b/views/ngXosLib/xosHelpers/spec/csrftoken.test.js
similarity index 100%
rename from gui/ngXosLib/xosHelpers/spec/csrftoken.test.js
rename to views/ngXosLib/xosHelpers/spec/csrftoken.test.js
diff --git a/gui/ngXosLib/xosHelpers/src/services/api.services.js b/views/ngXosLib/xosHelpers/src/services/api.services.js
similarity index 99%
rename from gui/ngXosLib/xosHelpers/src/services/api.services.js
rename to views/ngXosLib/xosHelpers/src/services/api.services.js
index 7a4baba..c7384f8 100644
--- a/gui/ngXosLib/xosHelpers/src/services/api.services.js
+++ b/views/ngXosLib/xosHelpers/src/services/api.services.js
@@ -29,4 +29,4 @@
}
return hpcApiCache;
}
-})();
\ No newline at end of file
+})();
diff --git a/gui/ngXosLib/xosHelpers/src/services/csrfToken.interceptor.js b/views/ngXosLib/xosHelpers/src/services/csrfToken.interceptor.js
similarity index 100%
rename from gui/ngXosLib/xosHelpers/src/services/csrfToken.interceptor.js
rename to views/ngXosLib/xosHelpers/src/services/csrfToken.interceptor.js
diff --git a/gui/ngXosLib/xosHelpers/src/services/noHyperlinks.interceptor.js b/views/ngXosLib/xosHelpers/src/services/noHyperlinks.interceptor.js
similarity index 100%
rename from gui/ngXosLib/xosHelpers/src/services/noHyperlinks.interceptor.js
rename to views/ngXosLib/xosHelpers/src/services/noHyperlinks.interceptor.js
diff --git a/gui/ngXosLib/xosHelpers/src/xosHelpers.module.js b/views/ngXosLib/xosHelpers/src/xosHelpers.module.js
similarity index 100%
rename from gui/ngXosLib/xosHelpers/src/xosHelpers.module.js
rename to views/ngXosLib/xosHelpers/src/xosHelpers.module.js
diff --git a/gui/ngXosViews/.gitignore b/views/ngXosViews/.gitignore
similarity index 100%
rename from gui/ngXosViews/.gitignore
rename to views/ngXosViews/.gitignore
diff --git a/gui/ngXosViews/ceilometerDashboard/.bowerrc b/views/ngXosViews/ceilometerDashboard/.bowerrc
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/.bowerrc
rename to views/ngXosViews/ceilometerDashboard/.bowerrc
diff --git a/gui/ngXosViews/ceilometerDashboard/.eslintrc b/views/ngXosViews/ceilometerDashboard/.eslintrc
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/.eslintrc
rename to views/ngXosViews/ceilometerDashboard/.eslintrc
diff --git a/gui/ngXosViews/ceilometerDashboard/.gitignore b/views/ngXosViews/ceilometerDashboard/.gitignore
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/.gitignore
rename to views/ngXosViews/ceilometerDashboard/.gitignore
diff --git a/gui/ngXosViews/ceilometerDashboard/bower.json b/views/ngXosViews/ceilometerDashboard/bower.json
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/bower.json
rename to views/ngXosViews/ceilometerDashboard/bower.json
diff --git a/gui/ngXosViews/ceilometerDashboard/env/default.js b/views/ngXosViews/ceilometerDashboard/env/default.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/env/default.js
rename to views/ngXosViews/ceilometerDashboard/env/default.js
diff --git a/gui/ngXosViews/ceilometerDashboard/env/srikanth.js b/views/ngXosViews/ceilometerDashboard/env/srikanth.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/env/srikanth.js
rename to views/ngXosViews/ceilometerDashboard/env/srikanth.js
diff --git a/gui/ngXosViews/ceilometerDashboard/gulp/build.js b/views/ngXosViews/ceilometerDashboard/gulp/build.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/gulp/build.js
rename to views/ngXosViews/ceilometerDashboard/gulp/build.js
diff --git a/gui/ngXosViews/ceilometerDashboard/gulp/server.js b/views/ngXosViews/ceilometerDashboard/gulp/server.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/gulp/server.js
rename to views/ngXosViews/ceilometerDashboard/gulp/server.js
diff --git a/gui/ngXosViews/ceilometerDashboard/gulpfile.js b/views/ngXosViews/ceilometerDashboard/gulpfile.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/gulpfile.js
rename to views/ngXosViews/ceilometerDashboard/gulpfile.js
diff --git a/gui/ngXosViews/ceilometerDashboard/karma.conf.js b/views/ngXosViews/ceilometerDashboard/karma.conf.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/karma.conf.js
rename to views/ngXosViews/ceilometerDashboard/karma.conf.js
diff --git a/gui/ngXosViews/ceilometerDashboard/package.json b/views/ngXosViews/ceilometerDashboard/package.json
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/package.json
rename to views/ngXosViews/ceilometerDashboard/package.json
diff --git a/gui/ngXosViews/ceilometerDashboard/spec/.eslintrc b/views/ngXosViews/ceilometerDashboard/spec/.eslintrc
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/spec/.eslintrc
rename to views/ngXosViews/ceilometerDashboard/spec/.eslintrc
diff --git a/gui/ngXosViews/ceilometerDashboard/spec/backend.mock.js b/views/ngXosViews/ceilometerDashboard/spec/backend.mock.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/spec/backend.mock.js
rename to views/ngXosViews/ceilometerDashboard/spec/backend.mock.js
diff --git a/gui/ngXosViews/ceilometerDashboard/spec/ceilometer.test.js b/views/ngXosViews/ceilometerDashboard/spec/ceilometer.test.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/spec/ceilometer.test.js
rename to views/ngXosViews/ceilometerDashboard/spec/ceilometer.test.js
diff --git a/gui/ngXosViews/ceilometerDashboard/src/css/ceilometerDashboard.css b/views/ngXosViews/ceilometerDashboard/src/css/ceilometerDashboard.css
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/css/ceilometerDashboard.css
rename to views/ngXosViews/ceilometerDashboard/src/css/ceilometerDashboard.css
diff --git a/gui/ngXosViews/ceilometerDashboard/src/css/dev.css b/views/ngXosViews/ceilometerDashboard/src/css/dev.css
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/css/dev.css
rename to views/ngXosViews/ceilometerDashboard/src/css/dev.css
diff --git a/gui/ngXosViews/ceilometerDashboard/src/index.html b/views/ngXosViews/ceilometerDashboard/src/index.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/index.html
rename to views/ngXosViews/ceilometerDashboard/src/index.html
diff --git a/gui/ngXosViews/ceilometerDashboard/src/js/main.js b/views/ngXosViews/ceilometerDashboard/src/js/main.js
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/js/main.js
rename to views/ngXosViews/ceilometerDashboard/src/js/main.js
diff --git a/gui/ngXosViews/ceilometerDashboard/src/meters_mock.json b/views/ngXosViews/ceilometerDashboard/src/meters_mock.json
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/meters_mock.json
rename to views/ngXosViews/ceilometerDashboard/src/meters_mock.json
diff --git a/gui/ngXosViews/ceilometerDashboard/src/stats_mock.json b/views/ngXosViews/ceilometerDashboard/src/stats_mock.json
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/stats_mock.json
rename to views/ngXosViews/ceilometerDashboard/src/stats_mock.json
diff --git a/gui/ngXosViews/ceilometerDashboard/src/templates/accordion-group.html b/views/ngXosViews/ceilometerDashboard/src/templates/accordion-group.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/templates/accordion-group.html
rename to views/ngXosViews/ceilometerDashboard/src/templates/accordion-group.html
diff --git a/gui/ngXosViews/ceilometerDashboard/src/templates/accordion.html b/views/ngXosViews/ceilometerDashboard/src/templates/accordion.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/templates/accordion.html
rename to views/ngXosViews/ceilometerDashboard/src/templates/accordion.html
diff --git a/gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-dashboard.tpl.html b/views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-dashboard.tpl.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-dashboard.tpl.html
rename to views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-dashboard.tpl.html
diff --git a/gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-samples.tpl.html b/views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-samples.tpl.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-samples.tpl.html
rename to views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-samples.tpl.html
diff --git a/gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-stats.tpl.html b/views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-stats.tpl.html
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/src/templates/ceilometer-stats.tpl.html
rename to views/ngXosViews/ceilometerDashboard/src/templates/ceilometer-stats.tpl.html
diff --git a/gui/ngXosViews/ceilometerDashboard/teone@clnode015.clemson.cloudlab.us b/views/ngXosViews/ceilometerDashboard/teone@clnode015.clemson.cloudlab.us
similarity index 100%
rename from gui/ngXosViews/ceilometerDashboard/teone@clnode015.clemson.cloudlab.us
rename to views/ngXosViews/ceilometerDashboard/teone@clnode015.clemson.cloudlab.us
diff --git a/gui/ngXosViews/contentProvider/.bowerrc b/views/ngXosViews/contentProvider/.bowerrc
similarity index 100%
rename from gui/ngXosViews/contentProvider/.bowerrc
rename to views/ngXosViews/contentProvider/.bowerrc
diff --git a/gui/ngXosViews/contentProvider/.eslintrc b/views/ngXosViews/contentProvider/.eslintrc
similarity index 100%
rename from gui/ngXosViews/contentProvider/.eslintrc
rename to views/ngXosViews/contentProvider/.eslintrc
diff --git a/gui/ngXosViews/contentProvider/.gitignore b/views/ngXosViews/contentProvider/.gitignore
similarity index 100%
rename from gui/ngXosViews/contentProvider/.gitignore
rename to views/ngXosViews/contentProvider/.gitignore
diff --git a/gui/ngXosViews/contentProvider/bower.json b/views/ngXosViews/contentProvider/bower.json
similarity index 100%
rename from gui/ngXosViews/contentProvider/bower.json
rename to views/ngXosViews/contentProvider/bower.json
diff --git a/gui/ngXosViews/contentProvider/gulp/build.js b/views/ngXosViews/contentProvider/gulp/build.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/gulp/build.js
rename to views/ngXosViews/contentProvider/gulp/build.js
diff --git a/gui/ngXosViews/contentProvider/gulp/server.js b/views/ngXosViews/contentProvider/gulp/server.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/gulp/server.js
rename to views/ngXosViews/contentProvider/gulp/server.js
diff --git a/gui/ngXosViews/contentProvider/gulpfile.js b/views/ngXosViews/contentProvider/gulpfile.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/gulpfile.js
rename to views/ngXosViews/contentProvider/gulpfile.js
diff --git a/gui/ngXosViews/contentProvider/karma.conf.js b/views/ngXosViews/contentProvider/karma.conf.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/karma.conf.js
rename to views/ngXosViews/contentProvider/karma.conf.js
diff --git a/gui/ngXosViews/contentProvider/package.json b/views/ngXosViews/contentProvider/package.json
similarity index 100%
rename from gui/ngXosViews/contentProvider/package.json
rename to views/ngXosViews/contentProvider/package.json
diff --git a/gui/ngXosViews/contentProvider/spec/contentprovider.test.js b/views/ngXosViews/contentProvider/spec/contentprovider.test.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/spec/contentprovider.test.js
rename to views/ngXosViews/contentProvider/spec/contentprovider.test.js
diff --git a/gui/ngXosViews/contentProvider/spec/mocks/contentProvider.mock.js b/views/ngXosViews/contentProvider/spec/mocks/contentProvider.mock.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/spec/mocks/contentProvider.mock.js
rename to views/ngXosViews/contentProvider/spec/mocks/contentProvider.mock.js
diff --git a/gui/ngXosViews/contentProvider/spec/sample.test.js b/views/ngXosViews/contentProvider/spec/sample.test.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/spec/sample.test.js
rename to views/ngXosViews/contentProvider/spec/sample.test.js
diff --git a/gui/ngXosViews/contentProvider/src/css/dev.css b/views/ngXosViews/contentProvider/src/css/dev.css
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/css/dev.css
rename to views/ngXosViews/contentProvider/src/css/dev.css
diff --git a/gui/ngXosViews/contentProvider/src/index.html b/views/ngXosViews/contentProvider/src/index.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/index.html
rename to views/ngXosViews/contentProvider/src/index.html
diff --git a/gui/ngXosViews/contentProvider/src/js/main.js b/views/ngXosViews/contentProvider/src/js/main.js
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/js/main.js
rename to views/ngXosViews/contentProvider/src/js/main.js
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_actions.html b/views/ngXosViews/contentProvider/src/templates/cp_actions.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_actions.html
rename to views/ngXosViews/contentProvider/src/templates/cp_actions.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_cdn_prefix.html b/views/ngXosViews/contentProvider/src/templates/cp_cdn_prefix.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_cdn_prefix.html
rename to views/ngXosViews/contentProvider/src/templates/cp_cdn_prefix.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_detail.html b/views/ngXosViews/contentProvider/src/templates/cp_detail.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_detail.html
rename to views/ngXosViews/contentProvider/src/templates/cp_detail.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_list.html b/views/ngXosViews/contentProvider/src/templates/cp_list.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_list.html
rename to views/ngXosViews/contentProvider/src/templates/cp_list.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_origin_server.html b/views/ngXosViews/contentProvider/src/templates/cp_origin_server.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_origin_server.html
rename to views/ngXosViews/contentProvider/src/templates/cp_origin_server.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_side_nav.html b/views/ngXosViews/contentProvider/src/templates/cp_side_nav.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_side_nav.html
rename to views/ngXosViews/contentProvider/src/templates/cp_side_nav.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/cp_user.html b/views/ngXosViews/contentProvider/src/templates/cp_user.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/cp_user.html
rename to views/ngXosViews/contentProvider/src/templates/cp_user.html
diff --git a/gui/ngXosViews/contentProvider/src/templates/users-list.tpl.html b/views/ngXosViews/contentProvider/src/templates/users-list.tpl.html
similarity index 100%
rename from gui/ngXosViews/contentProvider/src/templates/users-list.tpl.html
rename to views/ngXosViews/contentProvider/src/templates/users-list.tpl.html
diff --git a/xos/configurations/cord/Dockerfile.cord b/xos/configurations/cord/Dockerfile.cord
index 9fde1b0..3e63eb2 100644
--- a/xos/configurations/cord/Dockerfile.cord
+++ b/xos/configurations/cord/Dockerfile.cord
@@ -4,21 +4,21 @@
ADD xos/configurations/common/flat_net_name /root/setup/
ADD xos/configurations/common/nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
-ADD xos/configurations/common/id_rsa.pub /opt/xos/observers/vcpe/vcpe_public_key
-ADD xos/configurations/common/id_rsa /opt/xos/observers/vcpe/vcpe_private_key
-ADD xos/configurations/common/id_rsa.pub /opt/xos/observers/monitoring_channel/monitoring_channel_public_key
-ADD xos/configurations/common/id_rsa /opt/xos/observers/monitoring_channel/monitoring_channel_private_key
-ADD xos/configurations/common/id_rsa.pub /opt/xos/observers/onos/onos_key.pub
-ADD xos/configurations/common/id_rsa /opt/xos/observers/onos/onos_key
+ADD xos/configurations/common/id_rsa.pub /opt/xos/synchronizers/vcpe/vcpe_public_key
+ADD xos/configurations/common/id_rsa /opt/xos/synchronizers/vcpe/vcpe_private_key
+ADD xos/configurations/common/id_rsa.pub /opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key
+ADD xos/configurations/common/id_rsa /opt/xos/synchronizers/monitoring_channel/monitoring_channel_private_key
+ADD xos/configurations/common/id_rsa.pub /opt/xos/synchronizers/onos/onos_key.pub
+ADD xos/configurations/common/id_rsa /opt/xos/synchronizers/onos/onos_key
ADD xos/configurations/common/node_key.pub /root/setup/node_key.pub
ADD xos/configurations/common/node_key /root/setup/node_key
ADD xos/configurations/common/ceilometer_url /root/setup/ceilometer_url
-ADD xos/observers/vcpe/supervisor/vcpe-observer.conf /etc/supervisor/conf.d/
-ADD xos/observers/vbng/supervisor/vbng-observer.conf /etc/supervisor/conf.d/
-ADD xos/observers/onos/supervisor/onos-observer.conf /etc/supervisor/conf.d/
-ADD xos/observers/monitoring_channel/supervisor/monitoring_channel_observer.conf /etc/supervisor/conf.d/
-RUN sed -i 's/proxy_ssh=True/proxy_ssh=False/' /opt/xos/observers/vcpe/vcpe_observer_config
-RUN sed -i 's/proxy_ssh=True/proxy_ssh=False/' /opt/xos/observers/monitoring_channel/monitoring_channel_observer_config
+ADD xos/synchronizers/vcpe/supervisor/vcpe-observer.conf /etc/supervisor/conf.d/
+ADD xos/synchronizers/vbng/supervisor/vbng-observer.conf /etc/supervisor/conf.d/
+ADD xos/synchronizers/onos/supervisor/onos-observer.conf /etc/supervisor/conf.d/
+ADD xos/synchronizers/monitoring_channel/supervisor/monitoring_channel_observer.conf /etc/supervisor/conf.d/
+RUN sed -i 's/proxy_ssh=True/proxy_ssh=False/' /opt/xos/synchronizers/vcpe/vcpe_synchronizer_config
+RUN sed -i 's/proxy_ssh=True/proxy_ssh=False/' /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer_config
ADD xos/configurations/cord/virtualbng.json /root/setup/
ADD xos/configurations/cord/vtn-network-cfg.json /root/setup/
diff --git a/xos/configurations/cord/ceilometer.yaml b/xos/configurations/cord/ceilometer.yaml
index 82e697a..0ea5cbd 100644
--- a/xos/configurations/cord/ceilometer.yaml
+++ b/xos/configurations/cord/ceilometer.yaml
@@ -26,7 +26,7 @@
kind: ceilometer
# public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
# artifacts:
-# pubkey: /opt/xos/observers/vcpe/vcpe_public_key
+# pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
Private:
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index 8aa4676..89db720 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -34,9 +34,9 @@
view_url: /admin/cord/vcpeservice/$id$/
backend_network_label: hpc_client
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
- private_key_fn: /opt/xos/observers/vcpe/vcpe_private_key
+ private_key_fn: /opt/xos/synchronizers/vcpe/vcpe_private_key
artifacts:
- pubkey: /opt/xos/observers/vcpe/vcpe_public_key
+ pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
service_vbng:
type: tosca.nodes.VBNGService
@@ -54,7 +54,7 @@
view_url: /admin/onos/onosservice/$id$/
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
artifacts:
- pubkey: /opt/xos/observers/onos/onos_key.pub
+ pubkey: /opt/xos/synchronizers/onos/onos_key.pub
#
# To actually bring up the vBNG app
@@ -124,7 +124,7 @@
}
}
artifacts:
- pubkey: /opt/xos/observers/onos/onos_key.pub
+ pubkey: /opt/xos/synchronizers/onos/onos_key.pub
vOLT_ONOS_app:
@@ -137,7 +137,21 @@
node: service_volt
relationship: tosca.relationships.UsedByService
properties:
- dependencies: org.onosproject.openflow-base, org.onosproject.olt
+ install_dependencies: onos-ext-notifier-1.0-SNAPSHOT.oar, onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
+ dependencies: org.onosproject.openflow-base, org.onosproject.olt, org.ciena.onos.ext_notifier, org.ciena.onos.volt_event_publisher
+ component_config: >
+ {
+ "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{
+ "rabbit.user": "<rabbit_user>",
+ "rabbit.password": "<rabbit_password>",
+ "rabbit.host": "<rabbit_host>",
+ "publish.rabbit": "true",
+ "volt.events.rabbit.topic": "notifications.info",
+ "volt.events.rabbit.exchange": "voltlistener",
+ "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}",
+ "publish.volt.events": "true"
+ }
+ }
# config_network-cfg.json: >
# {
# "devices" : {
diff --git a/xos/configurations/cord/docker-compose.yml b/xos/configurations/cord/docker-compose.yml
index 3518f80..bfb04b8 100644
--- a/xos/configurations/cord/docker-compose.yml
+++ b/xos/configurations/cord/docker-compose.yml
@@ -29,7 +29,7 @@
extra_hosts:
- ctl:${MYIP}
volumes:
- - ../setup/id_rsa:/opt/xos/observers/onos/onos_key:ro # private key
+ - ../setup/id_rsa:/opt/xos/synchronizers/onos/onos_key:ro # private key
xos_synchronizer_vcpe:
image: xosproject/xos-synchronizer-openstack
@@ -42,7 +42,7 @@
extra_hosts:
- ctl:${MYIP}
volumes:
- - ../setup/id_rsa:/opt/xos/observers/vcpe/vcpe_private_key:ro # private key
+ - ../setup/id_rsa:/opt/xos/synchronizers/vcpe/vcpe_private_key:ro # private key
- ../setup:/root/setup:ro
xos_synchronizer_vbng:
@@ -67,7 +67,7 @@
extra_hosts:
- ctl:${MYIP}
volumes:
- - ../setup/id_rsa:/opt/xos/observers/monitoring_channel/monitoring_channel_private_key:ro # private key
+ - ../setup/id_rsa:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_private_key:ro # private key
# FUTURE
@@ -88,6 +88,6 @@
- ../setup:/root/setup:ro
- ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
- ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
- - ../setup/id_rsa.pub:/opt/xos/observers/onos/onos_key.pub:ro
- - ../setup/id_rsa.pub:/opt/xos/observers/vcpe/vcpe_public_key:ro
- - ../setup/id_rsa.pub:/opt/xos/observers/monitoring_channel/monitoring_channel_public_key:ro
+ - ../setup/id_rsa.pub:/opt/xos/synchronizers/onos/onos_key.pub:ro
+ - ../setup/id_rsa.pub:/opt/xos/synchronizers/vcpe/vcpe_public_key:ro
+ - ../setup/id_rsa.pub:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key:ro
diff --git a/xos/core/xoslib/methods/ceilometerview.py b/xos/core/xoslib/methods/ceilometerview.py
index 825cce4..1b46855 100644
--- a/xos/core/xoslib/methods/ceilometerview.py
+++ b/xos/core/xoslib/methods/ceilometerview.py
@@ -468,6 +468,80 @@
'label': '',
'description': _("Number of VCPUs"),
}),
+ ("disk.read.requests", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of read requests"),
+ }),
+ ("disk.write.requests", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of write requests"),
+ }),
+ ("disk.read.bytes", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Volume of reads"),
+ }),
+ ("disk.write.bytes", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Volume of writes"),
+ }),
+ ("disk.read.requests.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average rate of read requests"),
+ }),
+ ("disk.write.requests.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average rate of write requests"),
+ }),
+ ("disk.read.bytes.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average rate of reads"),
+ }),
+ ("disk.write.bytes.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average volume of writes"),
+ }),
+ ("disk.root.size", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Size of root disk"),
+ }),
+ ("disk.ephemeral.size", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Size of ephemeral disk"),
+ }),
+ ("network.incoming.bytes", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of incoming bytes "
+ "on the network for a VM interface"),
+ }),
+ ("network.outgoing.bytes", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of outgoing bytes "
+ "on the network for a VM interface"),
+ }),
+ ("network.incoming.packets", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of incoming "
+ "packets for a VM interface"),
+ }),
+ ("network.outgoing.packets", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Number of outgoing "
+ "packets for a VM interface"),
+ }),
("network.incoming.bytes.rate", {
'type': _("Nova"),
'label': '',
@@ -480,6 +554,18 @@
'description': _("Average rate per sec of outgoing "
"bytes on a VM network interface"),
}),
+ ("network.incoming.packets.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average rate per sec of incoming "
+ "packets on a VM network interface"),
+ }),
+ ("network.outgoing.packets.rate", {
+ 'type': _("Nova"),
+ 'label': '',
+ 'description': _("Average rate per sec of outgoing "
+ "packets on a VM network interface"),
+ }),
])
# Adding flavor based meters into meters_info dict
# TODO(lsmola) this kind of meter will be probably deprecated
@@ -512,21 +598,76 @@
'label': '',
'description': _("Existence of network"),
}),
+ ('network.create', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Creation requests for this network"),
+ }),
+ ('network.update', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Update requests for this network"),
+ }),
('subnet', {
'type': _("Neutron"),
'label': '',
'description': _("Existence of subnet"),
}),
+ ('subnet.create', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Creation requests for this subnet"),
+ }),
+ ('subnet.update', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Update requests for this subnet"),
+ }),
('port', {
'type': _("Neutron"),
'label': '',
'description': _("Existence of port"),
}),
+ ('port.create', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Creation requests for this port"),
+ }),
+ ('port.update', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Update requests for this port"),
+ }),
+ ('router', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Existence of router"),
+ }),
+ ('router.create', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Creation requests for this router"),
+ }),
+ ('router.update', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Update requests for this router"),
+ }),
('ip.floating', {
'type': _("Neutron"),
'label': '',
'description': _("Existence of floating ip"),
}),
+ ('ip.floating.create', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Creation requests for this floating ip"),
+ }),
+ ('ip.floating.update', {
+ 'type': _("Neutron"),
+ 'label': '',
+ 'description': _("Update requests for this floating ip"),
+ }),
])
def _get_glance_meters_info(self):
diff --git a/xos/services/onos/models.py b/xos/services/onos/models.py
index 80e903e..1e869d1 100644
--- a/xos/services/onos/models.py
+++ b/xos/services/onos/models.py
@@ -38,6 +38,7 @@
KIND = ONOS_KIND
default_attributes = {"name": "",
+ "install_dependencies": "",
"dependencies": ""}
def __init__(self, *args, **kwargs):
onos_services = ONOSService.get_service_objects().all()
@@ -84,6 +85,14 @@
def dependencies(self, value):
self.set_attribute("dependencies", value)
+ @property
+ def install_dependencies(self):
+ return self.get_attribute("install_dependencies", self.default_attributes["install_dependencies"])
+
+ @install_dependencies.setter
+ def install_dependencies(self, value):
+ self.set_attribute("install_dependencies", value)
+
#@property
#def instance(self):
# instance_id = self.get_attribute("instance_id", self.default_attributes["instance_id"])
diff --git a/xos/synchronizers/base/ansible.py b/xos/synchronizers/base/ansible.py
index 7c30685..d2dca3b 100644
--- a/xos/synchronizers/base/ansible.py
+++ b/xos/synchronizers/base/ansible.py
@@ -195,7 +195,7 @@
print "ANSIBLE_CONFIG=%s" % config_pathname
print "ANSIBLE_HOSTS=%s" % hosts_pathname
- return run_template(name, opts, path, ansible_config = config_pathname, ansible_hosts = hosts_pathname, run_ansible_script="/opt/xos/observer/run_ansible_verbose")
+ return run_template(name, opts, path, ansible_config = config_pathname, ansible_hosts = hosts_pathname, run_ansible_script="/opt/xos/synchronizers/base/run_ansible_verbose")
diff --git a/xos/synchronizers/helloworld/run.sh b/xos/synchronizers/helloworld/run.sh
index f56ffe3..1b9d834 100755
--- a/xos/synchronizers/helloworld/run.sh
+++ b/xos/synchronizers/helloworld/run.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-python helloworld-observer.py -C $XOS_DIR/observers/helloworld/helloworld_config
+python helloworld-synchronizer.py -C $XOS_DIR/synchronizers/helloworld/helloworld_config
diff --git a/xos/synchronizers/helloworld/start.sh b/xos/synchronizers/helloworld/start.sh
index 89240cd..7945db3 100755
--- a/xos/synchronizers/helloworld/start.sh
+++ b/xos/synchronizers/helloworld/start.sh
@@ -1,4 +1,4 @@
export XOS_DIR=/opt/xos
-echo $XOS_DIR/observers/helloworld/helloworld_config
-python helloworld-observer.py -C $XOS_DIR/observers/helloworld/helloworld_config
+echo $XOS_DIR/synchronizers/helloworld/helloworld_config
+python helloworld-synchronizer.py -C $XOS_DIR/synchronizers/helloworld/helloworld_config
diff --git a/xos/synchronizers/helloworldservice_complete/helloworldservice_config b/xos/synchronizers/helloworldservice_complete/helloworldservice_config
index b779d0e..69894fc 100644
--- a/xos/synchronizers/helloworldservice_complete/helloworldservice_config
+++ b/xos/synchronizers/helloworldservice_complete/helloworldservice_config
@@ -15,11 +15,11 @@
# Optional name
name=helloworldservice
# This is the location to the dependency graph you generate
-dependency_graph=/opt/xos/observers/helloworldservice_complete/model-deps
+dependency_graph=/opt/xos/synchronizers/helloworldservice_complete/model-deps
# The location of your SyncSteps
steps_dir=/opt/xos/synchronizers/helloworldservice_complete/steps
# A temporary directory that will be used by ansible
-sys_dir=/opt/xos/observers/helloworldservice_complete/sys
+sys_dir=/opt/xos/synchronizers/helloworldservice_complete/sys
# Location of the file to save logging messages to the backend log is often used
logfile=/var/log/xos_backend.log
# If this option is true, then nothing will change, we simply pretend to run
diff --git a/xos/synchronizers/helloworldservice_complete/run.sh b/xos/synchronizers/helloworldservice_complete/run.sh
index 6bce079..331f8ae 100755
--- a/xos/synchronizers/helloworldservice_complete/run.sh
+++ b/xos/synchronizers/helloworldservice_complete/run.sh
@@ -1,3 +1,3 @@
# Runs the XOS observer using helloworldservice_config
export XOS_DIR=/opt/xos
-python helloworldservice-observer.py -C $XOS_DIR/observers/helloworldservice_complete/helloworldservice_config
+python helloworldservice-synchronizer.py -C $XOS_DIR/synchronizers/helloworldservice_complete/helloworldservice_config
diff --git a/xos/synchronizers/helloworldservice_complete/steps/sync_helloworldtenant.py b/xos/synchronizers/helloworldservice_complete/steps/sync_helloworldtenant.py
index b7ed2a8..69a08f5 100644
--- a/xos/synchronizers/helloworldservice_complete/steps/sync_helloworldtenant.py
+++ b/xos/synchronizers/helloworldservice_complete/steps/sync_helloworldtenant.py
@@ -23,7 +23,7 @@
template_name = "sync_helloworldtenant.yaml"
# The location of the SSH private key to use when ansible connects to
# instances.
- service_key_name = "/opt/xos/observers/helloworldservice_complete/helloworldservice_private_key"
+ service_key_name = "/opt/xos/synchronizers/helloworldservice_complete/helloworldservice_private_key"
def __init__(self, *args, **kwargs):
super(SyncHelloWorldTenantComplete, self).__init__(*args, **kwargs)
diff --git a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.py b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.py
index 2e4eca8..db7d318 100644
--- a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.py
+++ b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.py
@@ -23,7 +23,7 @@
observes=MonitoringChannel
requested_interval=0
template_name = "sync_monitoringchannel.yaml"
- service_key_name = "/opt/xos/observers/monitoring_channel/monitoring_channel_private_key"
+ service_key_name = "/opt/xos/synchronizers/monitoring_channel/monitoring_channel_private_key"
def __init__(self, *args, **kwargs):
super(SyncMonitoringChannel, self).__init__(*args, **kwargs)
diff --git a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
index 6c5fc8c..cedf3a4 100644
--- a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
+++ b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
@@ -25,14 +25,14 @@
{% if delete %}
- name: Remove tenant
# FIXME: Adding dummy template action to avoid "action attribute missing in task" error
- template: src=/opt/xos/observers/monitoring_channel/templates/ceilometer_proxy_config.j2 dest=/usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config mode=0777
+ template: src=/opt/xos/synchronizers/monitoring_channel/templates/ceilometer_proxy_config.j2 dest=/usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config mode=0777
notify:
- stop monitoring-channel
- remove container
{% else %}
{% if full_setup %}
- name: Docker repository
- copy: src=/opt/xos/observers/monitoring_channel/files/docker.list
+ copy: src=/opt/xos/synchronizers/monitoring_channel/files/docker.list
dest=/etc/apt/sources.list.d/docker.list
- name: Import the repository key
@@ -61,12 +61,12 @@
shell: rm -f /etc/resolv.conf
- name: Install resolv.conf
- copy: src=/opt/xos/observers/monitoring_channel/files/vm-resolv.conf
+ copy: src=/opt/xos/synchronizers/monitoring_channel/files/vm-resolv.conf
dest=/etc/resolv.conf
{% endif %}
- name: ceilometer proxy config
- template: src=/opt/xos/observers/monitoring_channel/templates/ceilometer_proxy_config.j2 dest=/usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config mode=0777
+ template: src=/opt/xos/synchronizers/monitoring_channel/templates/ceilometer_proxy_config.j2 dest=/usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config mode=0777
notify:
# - restart monitoring-channel
- stop monitoring-channel
@@ -74,10 +74,10 @@
- start monitoring-channel
- name: Monitoring channel upstart
- template: src=/opt/xos/observers/monitoring_channel/templates/monitoring-channel.conf.j2 dest=/etc/init/monitoring-channel-{{ unique_id }}.conf
+ template: src=/opt/xos/synchronizers/monitoring_channel/templates/monitoring-channel.conf.j2 dest=/etc/init/monitoring-channel-{{ unique_id }}.conf
- name: Monitoring channel startup script
- template: src=/opt/xos/observers/monitoring_channel/templates/start-monitoring-channel.sh.j2 dest=/usr/local/sbin/start-monitoring-channel-{{ unique_id }}.sh mode=0755
+ template: src=/opt/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2 dest=/usr/local/sbin/start-monitoring-channel-{{ unique_id }}.sh mode=0755
notify:
# - restart monitoring-channel
- stop monitoring-channel
diff --git a/xos/synchronizers/monitoring_channel/supervisor/monitoring_channel_observer.conf b/xos/synchronizers/monitoring_channel/supervisor/monitoring_channel_observer.conf
index 1b78703..1c2dd42 100644
--- a/xos/synchronizers/monitoring_channel/supervisor/monitoring_channel_observer.conf
+++ b/xos/synchronizers/monitoring_channel/supervisor/monitoring_channel_observer.conf
@@ -1,2 +1,2 @@
[program:monitoring_channel_observer]
-command=python /opt/xos/observers/monitoring_channel/monitoring_channel_observer.py -C /opt/xos/observers/monitoring_channel/monitoring_channel_observer_config
+command=python /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer.py -C /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer_config
diff --git a/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar b/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar
new file mode 100644
index 0000000..893c01a
--- /dev/null
+++ b/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar
Binary files differ
diff --git a/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar b/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
new file mode 100644
index 0000000..7a32268
--- /dev/null
+++ b/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
Binary files differ
diff --git a/xos/synchronizers/onos/run.sh b/xos/synchronizers/onos/run.sh
index ea4c511..b108d5b 100755
--- a/xos/synchronizers/onos/run.sh
+++ b/xos/synchronizers/onos/run.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-python onos-observer.py -C $XOS_DIR/observers/onos/onos_observer_config
+python onos-synchronizer.py -C $XOS_DIR/synchronizers/onos/onos_synchronizer_config
diff --git a/xos/synchronizers/onos/start.sh b/xos/synchronizers/onos/start.sh
index c13ffbe..f0a1535 100755
--- a/xos/synchronizers/onos/start.sh
+++ b/xos/synchronizers/onos/start.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-nohup python onos-observer.py -C $XOS_DIR/observers/onos/onos_observer_config > /dev/null 2>&1 &
+nohup python onos-synchronizer.py -C $XOS_DIR/synchronizers/onos/onos_synchronizer_config > /dev/null 2>&1 &
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.py b/xos/synchronizers/onos/steps/sync_onosapp.py
index 91eec44..8942e59 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.py
+++ b/xos/synchronizers/onos/steps/sync_onosapp.py
@@ -5,12 +5,14 @@
import sys
import base64
import time
+import re
+import json
from django.db.models import F, Q
from xos.config import Config
from synchronizers.base.syncstep import SyncStep
from synchronizers.base.ansible import run_template_ssh
from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
-from core.models import Service, Slice
+from core.models import Service, Slice, ControllerSlice, ControllerUser
from services.onos.models import ONOSService, ONOSApp
from xos.logger import Logger, logging
@@ -25,7 +27,7 @@
observes=ONOSApp
requested_interval=0
template_name = "sync_onosapp.yaml"
- service_key_name = "/opt/xos/observers/onos/onos_key"
+ service_key_name = "/opt/xos/synchronizers/onos/onos_key"
def __init__(self, *args, **kwargs):
super(SyncONOSApp, self).__init__(*args, **kwargs)
@@ -86,10 +88,31 @@
result = result + '], "ipPrefix": "%s"}' % ipPrefix
return result
+ def get_dynamic_parameter_value(self, o, param):
+ instance = self.get_instance(o)
+ if not instance:
+ raise "No instance for ONOS App"
+ if param == 'rabbit_host':
+ return instance.controller.rabbit_host
+ if param == 'rabbit_user':
+ return instance.controller.rabbit_user
+ if param == 'rabbit_password':
+ return instance.controller.rabbit_password
+ if param == 'keystone_tenant_id':
+ cslice = ControllerSlice.objects.get(slice=instance.slice)
+ if not cslice:
+ raise Exception("Controller slice object for %s does not exist" % instance.slice.name)
+ return cslice.tenant_id
+ if param == 'keystone_user_id':
+ cuser = ControllerUser.objects.get(user=instance.creator)
+ if not cuser:
+ raise Exception("Controller user object for %s does not exist" % instance.creator)
+ return cuser.kuser_id
def write_configs(self, o):
o.config_fns = []
o.rest_configs = []
+ o.component_configs = []
o.files_dir = self.get_files_dir(o)
if not os.path.exists(o.files_dir):
@@ -131,6 +154,20 @@
# later.
file(os.path.join(o.files_dir, fn),"w").write(" " +value)
o.rest_configs.append( {"endpoint": endpoint, "fn": fn} )
+ if name.startswith("component_config"):
+ components = json.loads(value)
+ for component in components.keys():
+ config = components[component]
+ for key in config.keys():
+ config_val = config[key]
+ found = re.findall('<(.+?)>',config_val)
+ for x in found:
+ #Get value corresponding to that string
+ val = self.get_dynamic_parameter_value(o, x)
+ if val:
+ config_val = re.sub('<'+x+'>', val, config_val)
+ #TODO: else raise an exception?
+ o.component_configs.append( {"component": component, "config_params": "'{\""+key+"\":\""+config_val+"\"}'"} )
def prepare_record(self, o):
self.write_configs(o)
@@ -145,11 +182,17 @@
fields["config_fns"] = o.config_fns
fields["rest_configs"] = o.rest_configs
fields["early_rest_configs"] = o.early_rest_configs
+ fields["component_configs"] = o.component_configs
if o.dependencies:
fields["dependencies"] = [x.strip() for x in o.dependencies.split(",")]
else:
fields["dependencies"] = []
+ if o.install_dependencies:
+ fields["install_dependencies"] = [x.strip() for x in o.install_dependencies.split(",")]
+ else:
+ fields["install_dependencies"] = []
+
if (instance.isolation=="container"):
fields["ONOS_container"] = "%s-%s" % (instance.slice.name, str(instance.id))
else:
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.yaml b/xos/synchronizers/onos/steps/sync_onosapp.yaml
index a03368b..f0af0d6 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.yaml
+++ b/xos/synchronizers/onos/steps/sync_onosapp.yaml
@@ -7,6 +7,13 @@
vars:
appname: {{ appname }}
dependencies: {{ dependencies }}
+{% if component_configs %}
+ component_configs:
+{% for component_config in component_configs %}
+ - component: {{ component_config.component }}
+ config_params: {{ component_config.config_params }}
+{% endfor %}
+{% endif %}
{% if rest_configs %}
rest_configs:
{% for rest_config in rest_configs %}
@@ -25,7 +32,7 @@
tasks:
- name: Get Docker IP
- script: /opt/xos/observers/onos/scripts/dockerip.sh {{ ONOS_container }}
+ script: /opt/xos/synchronizers/onos/scripts/dockerip.sh {{ ONOS_container }}
register: onosaddr
- name: Wait for ONOS to come up
@@ -86,6 +93,30 @@
wait_for: timeout=15
{% endif %}
+{% if install_dependencies %}
+ - name: Install app file directory
+ file:
+ path=/home/ubuntu/{{ appname }}/apps/
+ state=directory
+
+ - name: Copy over app install files to ONOS host
+ copy:
+ src=/opt/xos/synchronizers/onos/{{ '{{' }} item {{ '}}' }}
+ dest=/home/ubuntu/{{ appname }}/apps/{{ '{{' }} item {{ '}}' }}
+ with_items:
+ {% for install_app in install_dependencies %}
+ - {{ install_app }}
+ {% endfor %}
+
+ - name: POST onos-app install command
+ command: >
+ curl -XPOST -HContent-Type:application/octet-stream -u karaf:karaf --data-binary @/home/ubuntu/{{ appname }}/apps/{{ '{{' }} item {{ '}}' }} http://{{ '{{' }} onosaddr.stdout {{ '}}' }}:8181/onos/v1/applications
+ with_items:
+ {% for dependency in install_dependencies %}
+ - {{ dependency }}
+ {% endfor %}
+{% endif %}
+
{% if dependencies %}
- name: Add dependencies to ONOS
uri:
@@ -99,6 +130,23 @@
{% endfor %}
{% endif %}
+{% if component_configs %}
+ - name: Add ONOS component configuration values
+ command: >
+ curl -XPOST -HContent-Type:application/json -u karaf:karaf -d {{ '{{' }} item.config_params | to_json {{ '}}' }} http://{{ '{{' }} onosaddr.stdout {{ '}}' }}:8181/onos/v1/configuration/{{
+ '{{' }} item.component {{ '}}' }}
+ with_items: "component_configs"
+
+# uri:
+# url: http://{{ '{{' }} onosaddr.stdout {{ '}}' }}:8181/onos/v1/configuration/{{ '{{' }} item.component {{ '}}' }} #http://localhost:8181/onos/v1/configuration/
+# body: "{{ '{{' }} item.config_params | to_json {{ '}}' }}"
+# body_format: json
+# method: POST
+# user: karaf
+# password: karaf
+# with_items: "component_configs"
+{% endif %}
+
{% if rest_configs %}
# Do this after services have been activated, or it will cause an exception.
# vOLT will re-read its net config; vbng may not.
diff --git a/xos/synchronizers/onos/steps/sync_onosservice.py b/xos/synchronizers/onos/steps/sync_onosservice.py
index 0474dc6..e70be0c 100644
--- a/xos/synchronizers/onos/steps/sync_onosservice.py
+++ b/xos/synchronizers/onos/steps/sync_onosservice.py
@@ -24,7 +24,7 @@
observes=ONOSService
requested_interval=0
template_name = "sync_onosservice.yaml"
- service_key_name = "/opt/xos/observers/onos/onos_key"
+ service_key_name = "/opt/xos/synchronizers/onos/onos_key"
def __init__(self, *args, **kwargs):
super(SyncONOSService, self).__init__(*args, **kwargs)
diff --git a/xos/synchronizers/onos/steps/sync_onosservice.yaml b/xos/synchronizers/onos/steps/sync_onosservice.yaml
index fd9c3db..a51fde5 100644
--- a/xos/synchronizers/onos/steps/sync_onosservice.yaml
+++ b/xos/synchronizers/onos/steps/sync_onosservice.yaml
@@ -52,7 +52,7 @@
- "9876:9876"
- name: Get Docker IP
- script: /opt/xos/observers/onos/scripts/dockerip.sh {{ ONOS_container }}
+ script: /opt/xos/synchronizers/onos/scripts/dockerip.sh {{ ONOS_container }}
register: dockerip
- name: Wait for ONOS to come up
diff --git a/xos/synchronizers/onos/supervisor/onos-observer.conf b/xos/synchronizers/onos/supervisor/onos-observer.conf
index 36e00d9..995644e 100644
--- a/xos/synchronizers/onos/supervisor/onos-observer.conf
+++ b/xos/synchronizers/onos/supervisor/onos-observer.conf
@@ -4,6 +4,6 @@
nodaemon=true
[program:synchronizer]
-command=python /opt/xos/observers/onos/onos-observer.py -C /opt/xos/observers/onos/onos_observer_config
+command=python /opt/xos/synchronizers/onos/onos-synchronizer.py -C /opt/xos/synchronizers/onos/onos_synchronizer_config
stderr_logfile=/var/log/supervisor/synchronizer.err.log
stdout_logfile=/var/log/supervisor/synchronizer.out.log
diff --git a/xos/synchronizers/vbng/run.sh b/xos/synchronizers/vbng/run.sh
index efb586f..de3ed7c 100755
--- a/xos/synchronizers/vbng/run.sh
+++ b/xos/synchronizers/vbng/run.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-python vbng-observer.py -C $XOS_DIR/observers/vbng/vbng_observer_config
+python vbng-synchronizer.py -C $XOS_DIR/synchronizers/vbng/vbng_synchronizer_config
diff --git a/xos/synchronizers/vbng/start.sh b/xos/synchronizers/vbng/start.sh
index 98008f4..9553610 100755
--- a/xos/synchronizers/vbng/start.sh
+++ b/xos/synchronizers/vbng/start.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-nohup python vbng-observer.py -C $XOS_DIR/observers/vbng/vbng_observer_config > /dev/null 2>&1 &
+nohup python vbng-synchronizer.py -C $XOS_DIR/synchronizers/vbng/vbng_synchronizer_config > /dev/null 2>&1 &
diff --git a/xos/synchronizers/vbng/supervisor/vbng-observer.conf b/xos/synchronizers/vbng/supervisor/vbng-observer.conf
index cff77b8..a999318 100644
--- a/xos/synchronizers/vbng/supervisor/vbng-observer.conf
+++ b/xos/synchronizers/vbng/supervisor/vbng-observer.conf
@@ -1,2 +1,2 @@
[program:vbng-observer]
-command=python /opt/xos/observers/vbng/vbng-observer.py -C /opt/xos/observers/vbng/vbng_observer_config
+command=python /opt/xos/synchronizers/vbng/vbng-synchronizer.py -C /opt/xos/synchronizers/vbng/vbng_synchronizer_config
diff --git a/xos/synchronizers/vcpe/run.sh b/xos/synchronizers/vcpe/run.sh
index f180e66..f7c670d 100755
--- a/xos/synchronizers/vcpe/run.sh
+++ b/xos/synchronizers/vcpe/run.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-python vcpe-observer.py -C $XOS_DIR/observers/vcpe/vcpe_observer_config
+python vcpe-synchronizer.py -C $XOS_DIR/synchronizers/vcpe/vcpe_synchronizer_config
diff --git a/xos/synchronizers/vcpe/start.sh b/xos/synchronizers/vcpe/start.sh
index b402e5d..dc5619b 100755
--- a/xos/synchronizers/vcpe/start.sh
+++ b/xos/synchronizers/vcpe/start.sh
@@ -3,4 +3,4 @@
#fi
export XOS_DIR=/opt/xos
-nohup python vcpe-observer.py -C $XOS_DIR/observers/vcpe/vcpe_observer_config > /dev/null 2>&1 &
+nohup python vcpe-synchronizer.py -C $XOS_DIR/synchronizers/vcpe/vcpe_synchronizer_config > /dev/null 2>&1 &
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
index 691671a..f0e9301 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
@@ -30,7 +30,7 @@
observes=VCPETenant
requested_interval=0
template_name = "sync_vcpetenant.yaml"
- service_key_name = "/opt/xos/observers/vcpe/vcpe_private_key"
+ service_key_name = "/opt/xos/synchronizers/vcpe/vcpe_private_key"
def __init__(self, *args, **kwargs):
super(SyncVCPETenant, self).__init__(*args, **kwargs)
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
index fdc21da..b9b4b9e 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
@@ -58,7 +58,7 @@
tasks:
{% if full_setup %}
- name: Docker repository
- copy: src=/opt/xos/observers/vcpe/files/docker.list
+ copy: src=/opt/xos/synchronizers/vcpe/files/docker.list
dest=/etc/apt/sources.list.d/docker.list
- name: Import the repository key
@@ -90,7 +90,7 @@
shell: rm -f /etc/resolv.conf
- name: Install resolv.conf
- copy: src=/opt/xos/observers/vcpe/files/vm-resolv.conf
+ copy: src=/opt/xos/synchronizers/vcpe/files/vm-resolv.conf
dest=/etc/resolv.conf
- name: Verify if vcpe_stats_notifier ([] is to avoid capturing the shell process) cron job is already running
@@ -105,7 +105,7 @@
when: cron_job_pids_count.stdout == "0"
- name: Copy cron job to destination
- copy: src=/opt/xos/observers/vcpe/vcpe_stats_notifier.py
+ copy: src=/opt/xos/synchronizers/vcpe/vcpe_stats_notifier.py
dest=~/bin/vcpe_stats_notifier.py
when: cron_job_pids_count.stdout == "0"
@@ -121,10 +121,10 @@
{% endif %}
- name: vCPE upstart
- template: src=/opt/xos/observers/vcpe/templates/vcpe.conf.j2 dest=/etc/init/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}.conf
+ template: src=/opt/xos/synchronizers/vcpe/templates/vcpe.conf.j2 dest=/etc/init/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}.conf
- name: vCPE startup script
- template: src=/opt/xos/observers/vcpe/templates/start-vcpe.sh.j2 dest=/usr/local/sbin/start-vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}.sh mode=0755
+ template: src=/opt/xos/synchronizers/vcpe/templates/start-vcpe.sh.j2 dest=/usr/local/sbin/start-vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}.sh mode=0755
notify:
# - restart vcpe
- stop vcpe
@@ -135,22 +135,22 @@
file: path=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d state=directory owner=root group=root
- name: vCPE basic dnsmasq config
- copy: src=/opt/xos/observers/vcpe/files/vcpe.dnsmasq dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/vcpe.conf owner=root group=root
+ copy: src=/opt/xos/synchronizers/vcpe/files/vcpe.dnsmasq dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/vcpe.conf owner=root group=root
notify:
- restart dnsmasq
- name: dnsmasq config
- template: src=/opt/xos/observers/vcpe/templates/dnsmasq_servers.j2 dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/servers.conf owner=root group=root
+ template: src=/opt/xos/synchronizers/vcpe/templates/dnsmasq_servers.j2 dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/servers.conf owner=root group=root
notify:
- restart dnsmasq
# These are samples, not necessary for correct function of demo
# - name: networking info
-# template: src=/opt/xos/observers/vcpe/templates/vlan_sample.j2 dest=/etc/vlan_sample owner=root group=root
+# template: src=/opt/xos/synchronizers/vcpe/templates/vlan_sample.j2 dest=/etc/vlan_sample owner=root group=root
# - name: firewall info
-# template: src=/opt/xos/observers/vcpe/templates/firewall_sample.j2 dest=/etc/firewall_sample owner=root group=root
+# template: src=/opt/xos/synchronizers/vcpe/templates/firewall_sample.j2 dest=/etc/firewall_sample owner=root group=root
- name: Make sure vCPE service is running
service: name=vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} state=started
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
index 6c7166f..59047c1 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
@@ -69,7 +69,7 @@
when: cron_job_pids_count.stdout == "0"
- name: Copy cron job to destination
- copy: src=/opt/xos/observers/vcpe/vcpe_stats_notifier.py
+ copy: src=/opt/xos/synchronizers/vcpe/vcpe_stats_notifier.py
dest=~/bin/vcpe_stats_notifier.py
when: cron_job_pids_count.stdout == "0"
@@ -84,12 +84,12 @@
when: cron_job_pids_count.stdout == "0"
- name: vCPE basic dnsmasq config
- copy: src=/opt/xos/observers/vcpe/files/vcpe.dnsmasq dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/vcpe.conf owner=root group=root
+ copy: src=/opt/xos/synchronizers/vcpe/files/vcpe.dnsmasq dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/vcpe.conf owner=root group=root
notify:
- restart dnsmasq
- name: dnsmasq config
- template: src=/opt/xos/observers/vcpe/templates/dnsmasq_servers.j2 dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/servers.conf owner=root group=root
+ template: src=/opt/xos/synchronizers/vcpe/templates/dnsmasq_servers.j2 dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/servers.conf owner=root group=root
notify:
- restart dnsmasq
@@ -97,22 +97,22 @@
file: path=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/safe state=directory
- name: dnsmasq "safe" config
- template: src=/opt/xos/observers/vcpe/templates/dnsmasq_safe_servers.j2 dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/safe/servers.conf owner=root group=root
+ template: src=/opt/xos/synchronizers/vcpe/templates/dnsmasq_safe_servers.j2 dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/safe/servers.conf owner=root group=root
notify:
- restart dnsmasq
- name: copy base ufw files
- synchronize: src=/opt/xos/observers/vcpe/files/etc/ufw/ dest=/var/container_volumes/{{ container_name }}/etc/ufw/
+ synchronize: src=/opt/xos/synchronizers/vcpe/files/etc/ufw/ dest=/var/container_volumes/{{ container_name }}/etc/ufw/
notify:
- reload ufw
- name: redirection rules for safe DNS
- template: src=/opt/xos/observers/vcpe/templates/before.rules.j2 dest=/var/container_volumes/{{ container_name }}/etc/ufw/before.rules owner=root group=root
+ template: src=/opt/xos/synchronizers/vcpe/templates/before.rules.j2 dest=/var/container_volumes/{{ container_name }}/etc/ufw/before.rules owner=root group=root
notify:
- reload ufw
- name: base ufw setup uses /etc/rc.local
- copy: src=/opt/xos/observers/vcpe/files/etc/rc.local dest=/var/container_volumes/{{ container_name }}/etc/ owner=root group=root
+ copy: src=/opt/xos/synchronizers/vcpe/files/etc/rc.local dest=/var/container_volumes/{{ container_name }}/etc/ owner=root group=root
notify:
- copy in /etc/rc.local
diff --git a/xos/synchronizers/vcpe/supervisor/vcpe-observer.conf b/xos/synchronizers/vcpe/supervisor/vcpe-observer.conf
index 27d2796..13d797a 100644
--- a/xos/synchronizers/vcpe/supervisor/vcpe-observer.conf
+++ b/xos/synchronizers/vcpe/supervisor/vcpe-observer.conf
@@ -1,2 +1,2 @@
[program:vcpe-observer]
-command=python /opt/xos/observers/vcpe/vcpe-observer.py -C /opt/xos/observers/vcpe/vcpe_observer_config
+command=python /opt/xos/synchronizers/vcpe/vcpe-synchronizer.py -C /opt/xos/synchronizers/vcpe/vcpe_synchronizer_config
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 30798d5..39e4d99 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -140,6 +140,12 @@
dependencies:
type: string
required: false
+ install_dependencies:
+ type: string
+ required: false
+ component_config:
+ type: string
+ required: false
config_addresses.json:
type: string
required: false
@@ -159,6 +165,12 @@
dependencies:
type: string
required: false
+ install_dependencies:
+ type: string
+ required: false
+ component_config:
+ type: string
+ required: false
config_network-cfg.json:
type: string
required: false
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 63d7395..613db70 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -145,6 +145,12 @@
dependencies:
type: string
required: false
+ install_dependencies:
+ type: string
+ required: false
+ component_config:
+ type: string
+ required: false
tosca.nodes.ONOSvBNGApp:
derived_from: tosca.nodes.Root
@@ -162,6 +168,12 @@
dependencies:
type: string
required: false
+ install_dependencies:
+ type: string
+ required: false
+ component_config:
+ type: string
+ required: false
config_addresses.json:
type: string
required: false
@@ -188,6 +200,12 @@
dependencies:
type: string
required: false
+ install_dependencies:
+ type: string
+ required: false
+ component_config:
+ type: string
+ required: false
config_network-cfg.json:
type: string
required: false
diff --git a/xos/tosca/resources/onosapp.py b/xos/tosca/resources/onosapp.py
index 42cb0bf..5947400 100644
--- a/xos/tosca/resources/onosapp.py
+++ b/xos/tosca/resources/onosapp.py
@@ -14,7 +14,7 @@
class XOSONOSApp(XOSResource):
provides = ["tosca.nodes.ONOSApp", "tosca.nodes.ONOSvBNGApp", "tosca.nodes.ONOSvOLTApp", "tosca.nodes.ONOSVTNApp"]
xos_model = ONOSApp
- copyin_props = ["service_specific_id", "dependencies"]
+ copyin_props = ["service_specific_id", "dependencies", "install_dependencies"]
def get_xos_args(self, throw_exception=True):
args = super(XOSONOSApp, self).get_xos_args()
@@ -59,6 +59,8 @@
self.set_tenant_attr(obj, k, v)
elif k.startswith("rest_"):
self.set_tenant_attr(obj, k, v)
+ elif k.startswith("component_config"):
+ self.set_tenant_attr(obj, k, v)
def can_delete(self, obj):
return super(XOSONOSApp, self).can_delete(obj)