Implemented new API generator
diff --git a/views/ngXosLib/.eslintrc b/views/ngXosLib/.eslintrc
new file mode 100644
index 0000000..f9a952f
--- /dev/null
+++ b/views/ngXosLib/.eslintrc
@@ -0,0 +1,42 @@
+{
+    "ecmaFeatures": {
+        "blockBindings": true,
+        "forOf": true,
+        "destructuring": true,
+        "arrowFunctions": true,
+        "templateStrings": true
+    },
+    "env": { 
+        "browser": true,
+        "node": true,
+        "es6": true
+    },
+    "plugins": [
+        //"angular"
+    ],
+    "rules": {
+        "quotes": [2, "single"],
+        "camelcase": [0, {"properties": "always"}],
+        "no-underscore-dangle": 1,
+        "eqeqeq": [2, "smart"],
+        "no-alert": 1,
+        "key-spacing": [1, { "beforeColon": false, "afterColon": true }],
+        "indent": [2, 2],
+        "no-irregular-whitespace": 1,
+        "eol-last": 0,
+        "max-nested-callbacks": [2, 4],
+        "comma-spacing": [1, {"before": false, "after": true}],
+        "no-trailing-spaces": [1, { skipBlankLines: true }],
+        "no-unused-vars": [1, {"vars": "all", "args": "after-used"}],
+        "new-cap": 0,
+
+        //"angular/ng_module_name": [2, '/^xos\.*[a-z]*$/'],
+        //"angular/ng_controller_name": [2, '/^[a-z].*Ctrl$/'],
+        //"angular/ng_service_name": [2, '/^[A-Z].*Service$/'],
+        //"angular/ng_directive_name": [2, '/^[a-z]+[[A-Z].*]*$/'],
+        //"angular/ng_di": [0, "function or array"]
+    },
+    "globals" :{
+        "angular": true
+    } 
+}
\ No newline at end of file
diff --git a/views/ngXosLib/apigen/blueprintToNgResource.js b/views/ngXosLib/apigen/blueprintToNgResource.js
new file mode 100644
index 0000000..20f2869
--- /dev/null
+++ b/views/ngXosLib/apigen/blueprintToNgResource.js
@@ -0,0 +1,75 @@
+'use strict';
+
+const protagonist = require('protagonist');
+const fs = require('fs');
+const P = require('bluebird');
+const _ = require('lodash');
+const chalk = require('chalk');
+const Handlebars = require('handlebars');
+
+P.promisifyAll(fs);
+P.promisifyAll(protagonist);
+
+const angualarModuleName = 'xos.helpers'
+
+// format href in angular format
+const formatHref = url => url.replace('{', ':').replace('}', '');
+
+const formatTitle = title => title.split(' ').join('-');
+
+const getParamName = url => url.match(/\{([^)]+)\}/) ? url.match(/\{([^)]+)\}/)[1] : '';
+
+// Get Group description
+const getGroupDescription = (group) => _.find(group, {element: 'copy'}) ? _.find(group, {element: 'copy'}).content.replace(/\n$/, '') : '';
+
+// Loop APIs endpoint
+const loopApiEndpoint = (group) => {
+  // {name: 'ResourceName', attributes: {href: '/ahhsiiis'}}
+  _.remove(group, {element: 'copy'})
+  // console.log(group);
+  // _.forEach(group, d => console.log(d));
+
+  return _.map(group, g => {
+    return {
+      name: formatTitle(g.meta.title),
+      param: {href: formatHref(g.attributes.href), name: getParamName(g.attributes.href)},
+    }
+  })
+};
+
+// Loop APIs groups
+const loopApiGroups = (defs) => {
+  if (!Array.isArray(defs)) {
+    return;
+  }
+  _.forEach(defs, d => {
+    console.info(chalk.blue.bold(`Parsing Group: ${d.meta.title}`));
+    var data = {
+      description: getGroupDescription(d.content),
+      ngModule: angualarModuleName,
+      resources: loopApiEndpoint(d.content)
+    };
+    fs.writeFileSync(`../xosHelpers/src/services/rest/${formatTitle(d.meta.title)}.js`, handlebarsTemplate(data));
+  });
+
+  console.info(chalk.green.bold(`Api Generated`));
+
+};
+
+// Loop the top level definitions
+const loopApiDefinitions = (defs) => {
+  _.forEach(defs, d => loopApiGroups(d.content));
+};
+
+let handlebarsTemplate;
+
+// read blueprint docs and parse
+fs.readFileAsync('./ngResourceTemplate.handlebars', 'utf8')
+.then((template) => {
+  handlebarsTemplate = Handlebars.compile(template);
+  return fs.readFileAsync('../../../xos/tests/api/apiary.apib', 'utf8')
+})
+.then(data => protagonist.parseAsync(data))
+.then(result => loopApiDefinitions(result.content))
+.catch(console.warn);
+
diff --git a/views/ngXosLib/apigen/ngResourceTemplate.handlebars b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
new file mode 100644
index 0000000..d326a51
--- /dev/null
+++ b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
@@ -0,0 +1,14 @@
+'use strict';
+{{#if description}}
+
+/*
+ * {{description}}
+ */
+{{/if}}
+
+angular.module('{{ngModule}}')
+{{#each resources}}
+.service('{{name}}', function($resource){
+  return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }{{/if}});
+})
+{{/each}}
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Apps.js b/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Apps.js
new file mode 100644
index 0000000..8634f2b
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Apps.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('xos.helpers')
+.service('ONOS-App-Collection', function($resource){
+  return $resource('/api/tenant/onos/app/');
+})
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Services.js b/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Services.js
new file mode 100644
index 0000000..a2302fb
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/ONOS-Services.js
@@ -0,0 +1,11 @@
+'use strict';
+
+/*
+ * List of the active onos services
+
+ */
+
+angular.module('xos.helpers')
+.service('ONOS-Services-Collection', function($resource){
+  return $resource('/api/service/onos/');
+})
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js b/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js
new file mode 100644
index 0000000..9618b27
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js
@@ -0,0 +1,29 @@
+'use strict';
+
+/*
+ * Resource related to the CORD Subscribers.
+
+ */
+
+angular.module('xos.helpers')
+.service('Subscribers', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features-uplink_speed', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features-downlink_speed', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features-cdn', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/cdn/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features-uverse', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uverse/', { subscriber_id: '@id'});
+})
+.service('Subscriber-features-status', function($resource){
+  return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/status/', { subscriber_id: '@id'});
+})
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js b/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js
new file mode 100644
index 0000000..4e3f39a
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js
@@ -0,0 +1,11 @@
+'use strict';
+
+/*
+ * Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
+
+ */
+
+angular.module('xos.helpers')
+.service('Truckroll-Collection', function($resource){
+  return $resource('/api/tenant/truckroll/:truckroll_id/', { truckroll_id: '@id'});
+})
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/vOLT.js b/views/ngXosLib/xosHelpers/src/services/rest/vOLT.js
new file mode 100644
index 0000000..fc1cda2
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/vOLT.js
@@ -0,0 +1,11 @@
+'use strict';
+
+/*
+ * OLT devices aggregate a set of subscriber connections
+
+ */
+
+angular.module('xos.helpers')
+.service('vOLT-Collection', function($resource){
+  return $resource('/api/tenant/cord/volt/:volt_id/', { volt_id: '@id'});
+})
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/vSG.js b/views/ngXosLib/xosHelpers/src/services/rest/vSG.js
new file mode 100644
index 0000000..04ffa0e
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/vSG.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('xos.helpers')
+.service('vSG-Collection', function($resource){
+  return $resource('/api/service/vsg/');
+})
diff --git a/xos/tests/api/apiary.apib b/xos/tests/api/apiary.apib
index 43a81c7..5e1b7ae 100644
--- a/xos/tests/api/apiary.apib
+++ b/xos/tests/api/apiary.apib
@@ -5,6 +5,8 @@
  
 # Group ONOS Services
 
+List of the active onos services
+
 ## ONOS Services Collection [/api/service/onos/]
 
 ### List all ONOS Services [GET]
@@ -48,7 +50,7 @@
 
 Resource related to the CORD Subscribers.
 
-## Subscribers Collection [/api/tenant/cord/subscriber/]
+## Subscribers [/api/tenant/cord/subscriber/{subscriber_id}/]
 
 ### List All Subscribers [GET]
 
@@ -82,13 +84,12 @@
             }
         ]
 
-## Subscriber Detail [/api/tenant/cord/subscriber/{subscriber_id}/]
+
+### View a Subscriber Detail [GET]
 
 + Parameters
     + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
 
-### View a Subscriber Detail [GET]
-
 + Response 200 (application/json)
  
         {
@@ -119,6 +120,9 @@
 
 ### Delete a Subscriber [DELETE]
 
++ Parameters
+    + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
+
 + Response 204
 
 ### Subscriber features [/api/tenant/cord/subscriber/{subscriber_id}/features/]
@@ -278,7 +282,7 @@
 
 Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
 
-## Truckroll Collection [/api/tenant/truckroll/]
+## Truckroll Collection [/api/tenant/truckroll/{truckroll_id}/]
 
 ### List all Truckroll [GET]
 
@@ -302,6 +306,8 @@
 
 ### Create a Truckroll [POST]
 
+A virtual truckroll is complete once is_synced equal true
+
 + Request (application/json)
 
         {
@@ -327,15 +333,12 @@
             "backend_status": "0 - Provisioning in progress"
         }
 
-## Truckroll Detail [/api/tenant/truckroll/{truckroll_id}/]
 
-A virtual truckroll is complete once is_synced equal true
+### View a Truckroll Detail [GET]
 
 + Parameters
     + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
 
-### View a Truckroll Detail [GET]
-
 + Response 200 (application/json)
 
         {
@@ -354,6 +357,9 @@
 
 ### Delete a Truckroll Detail [DELETE]
 
++ Parameters
+    + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
+
 + Response 204
 
  
@@ -362,7 +368,7 @@
 
 OLT devices aggregate a set of subscriber connections
 
-## vOLT Collection [/api/tenant/cord/volt/]
+## vOLT Collection [/api/tenant/cord/volt/{volt_id}/]
 
 ### List all vOLT [GET]
 
@@ -414,15 +420,11 @@
                 }
             }
 
-## vOLT Detail [/api/tenant/cord/volt/{volt_id}/]
-
-A virtual volt is complete once is_synced equal true
+### View a vOLT Detail [GET]
 
 + Parameters
     + volt_id: 1 (number) - ID of the vOLT in the form of an integer
 
-### View a vOLT Detail [GET]
-
 + Response 200 (application/json)
 
         {
@@ -445,7 +447,7 @@
  
 # Group ONOS Apps
 
-## app Collection [/api/tenant/onos/app/]
+## ONOS App Collection [/api/tenant/onos/app/]
 
 ### List all apps [GET]
 
diff --git a/xos/tests/api/hooks.py b/xos/tests/api/hooks.py
index 6779014..562798a 100644
--- a/xos/tests/api/hooks.py
+++ b/xos/tests/api/hooks.py
@@ -176,13 +176,13 @@
     setUpTruckroll()
 
 
-@hooks.before("Truckroll > Truckroll Detail > View a Truckroll Detail")
+@hooks.before("Truckroll > Truckroll Collection > View a Truckroll Detail")
 def test2(transaction):
     deleteTruckrolls()
     createTruckroll()
 
 
-@hooks.before("Truckroll > Truckroll Detail > Delete a Truckroll Detail")
+@hooks.before("Truckroll > Truckroll Collection > Delete a Truckroll Detail")
 def test3(transaction):
     deleteTruckrolls()
     createTruckroll()
diff --git a/xos/tests/api/source/service/onos.md b/xos/tests/api/source/service/onos.md
index 3b5e623..0b82a86 100644
--- a/xos/tests/api/source/service/onos.md
+++ b/xos/tests/api/source/service/onos.md
@@ -1,5 +1,7 @@
 # Group ONOS Services
 
+List of the active onos services
+
 ## ONOS Services Collection [/api/service/onos/]
 
 ### List all ONOS Services [GET]
diff --git a/xos/tests/api/source/tenant/cord/subscribers.md b/xos/tests/api/source/tenant/cord/subscribers.md
index bd38d04..61126ce 100644
--- a/xos/tests/api/source/tenant/cord/subscribers.md
+++ b/xos/tests/api/source/tenant/cord/subscribers.md
@@ -2,7 +2,7 @@
 
 Resource related to the CORD Subscribers.
 
-## Subscribers Collection [/api/tenant/cord/subscriber/]
+## Subscribers [/api/tenant/cord/subscriber/{subscriber_id}/]
 
 ### List All Subscribers [GET]
 
@@ -36,13 +36,12 @@
             }
         ]
 
-## Subscriber Detail [/api/tenant/cord/subscriber/{subscriber_id}/]
+
+### View a Subscriber Detail [GET]
 
 + Parameters
     + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
 
-### View a Subscriber Detail [GET]
-
 + Response 200 (application/json)
  
         {
@@ -73,6 +72,9 @@
 
 ### Delete a Subscriber [DELETE]
 
++ Parameters
+    + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
+
 + Response 204
 
 ### Subscriber features [/api/tenant/cord/subscriber/{subscriber_id}/features/]
diff --git a/xos/tests/api/source/tenant/cord/truckroll.md b/xos/tests/api/source/tenant/cord/truckroll.md
index 33b67db..996c19c 100644
--- a/xos/tests/api/source/tenant/cord/truckroll.md
+++ b/xos/tests/api/source/tenant/cord/truckroll.md
@@ -2,7 +2,7 @@
 
 Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
 
-## Truckroll Collection [/api/tenant/truckroll/]
+## Truckroll Collection [/api/tenant/truckroll/{truckroll_id}/]
 
 ### List all Truckroll [GET]
 
@@ -26,6 +26,8 @@
 
 ### Create a Truckroll [POST]
 
+A virtual truckroll is complete once is_synced equal true
+
 + Request (application/json)
 
         {
@@ -51,15 +53,12 @@
             "backend_status": "0 - Provisioning in progress"
         }
 
-## Truckroll Detail [/api/tenant/truckroll/{truckroll_id}/]
 
-A virtual truckroll is complete once is_synced equal true
+### View a Truckroll Detail [GET]
 
 + Parameters
     + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
 
-### View a Truckroll Detail [GET]
-
 + Response 200 (application/json)
 
         {
@@ -78,4 +77,7 @@
 
 ### Delete a Truckroll Detail [DELETE]
 
++ Parameters
+    + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
+
 + Response 204
diff --git a/xos/tests/api/source/tenant/cord/volt.md b/xos/tests/api/source/tenant/cord/volt.md
index 09140fd..51cb679 100644
--- a/xos/tests/api/source/tenant/cord/volt.md
+++ b/xos/tests/api/source/tenant/cord/volt.md
@@ -2,7 +2,7 @@
 
 OLT devices aggregate a set of subscriber connections
 
-## vOLT Collection [/api/tenant/cord/volt/]
+## vOLT Collection [/api/tenant/cord/volt/{volt_id}/]
 
 ### List all vOLT [GET]
 
@@ -54,15 +54,11 @@
                 }
             }
 
-## vOLT Detail [/api/tenant/cord/volt/{volt_id}/]
-
-A virtual volt is complete once is_synced equal true
+### View a vOLT Detail [GET]
 
 + Parameters
     + volt_id: 1 (number) - ID of the vOLT in the form of an integer
 
-### View a vOLT Detail [GET]
-
 + Response 200 (application/json)
 
         {
diff --git a/xos/tests/api/source/tenant/onos/app.md b/xos/tests/api/source/tenant/onos/app.md
index a43aae9..5376c33 100644
--- a/xos/tests/api/source/tenant/onos/app.md
+++ b/xos/tests/api/source/tenant/onos/app.md
@@ -1,6 +1,6 @@
 # Group ONOS Apps
 
-## app Collection [/api/tenant/onos/app/]
+## ONOS App Collection [/api/tenant/onos/app/]
 
 ### List all apps [GET]