Fixed build in generator
diff --git a/views/ngXosLib/generator-xos/app/templates/gulp/build.js b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
index bd31a25..2861020 100644
--- a/views/ngXosLib/generator-xos/app/templates/gulp/build.js
+++ b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
@@ -13,7 +13,7 @@
var uglify = require('gulp-uglify');
var templateCache = require('gulp-angular-templatecache');
var runSequence = require('run-sequence');
-var concat = require('gulp-concat');
+var concat = require('gulp-concat-util');
var del = require('del');
var wiredep = require('wiredep');
var angularFilesort = require('gulp-angular-filesort');
@@ -23,6 +23,13 @@
var rename = require('gulp-rename');
var replace = require('gulp-replace');
+const TEMPLATE_FOOTER = `
+angular.module('xos.<%= name %>')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
+
module.exports = function(options){
// delete previous builded file
@@ -66,7 +73,7 @@
// copy css in correct folder
gulp.task('copyCss', ['css'], function(){
return gulp.src([`${options.tmp}/css/*.css`])
- .pipe(concat('xosDiagnostic.css'))
+ .pipe(concat('xos<%= fileName %>.css'))
.pipe(gulp.dest(options.static + 'css/'))
});
@@ -78,6 +85,8 @@
.pipe(ngAnnotate())
.pipe(angularFilesort())
.pipe(concat('xos<%= fileName %>.js'))
+ .pipe(concat.header('//Autogenerated, do not edit!!!\n'))
+ .pipe(concat.footer(TEMPLATE_FOOTER))
.pipe(uglify())
.pipe(gulp.dest(options.static + 'js/'));
});
diff --git a/views/ngXosViews/diagnostic/gulp/build.js b/views/ngXosViews/diagnostic/gulp/build.js
index c9cd9cb..1a1be80 100644
--- a/views/ngXosViews/diagnostic/gulp/build.js
+++ b/views/ngXosViews/diagnostic/gulp/build.js
@@ -27,6 +27,13 @@
var mqpacker = require('css-mqpacker');
var csswring = require('csswring');
+const TEMPLATE_FOOTER = `
+angular.module('xos.diagnostic')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
+
module.exports = function(options){
// delete previous builded file
@@ -69,8 +76,8 @@
.pipe(angularFilesort())
.pipe(concat('xosDiagnostic.js'))
.pipe(concat.header('//Autogenerated, do not edit!!!\n'))
- // .pipe(concat.footer(TEMPLATE_FOOTER))
- // .pipe(uglify())
+ .pipe(concat.footer(TEMPLATE_FOOTER))
+ .pipe(uglify())
.pipe(gulp.dest(options.static + 'js/'));
});
diff --git a/views/ngXosViews/sampleView/env/default.js b/views/ngXosViews/sampleView/env/default.js
index 5b198ec..353973a 100644
--- a/views/ngXosViews/sampleView/env/default.js
+++ b/views/ngXosViews/sampleView/env/default.js
@@ -7,7 +7,7 @@
// (works only for local environment as both application are served on the same domain)
module.exports = {
- host: '',
- xoscsrftoken: '',
- xossessionid: ''
+ host: 'http://xos.dev:9999/',
+ xoscsrftoken: 'jkKF9NebQoyaxKFT42l1EFjGx6ESPuP4',
+ xossessionid: 'kvq9qxycbu0298wxfg8v11at94q9m819'
};
diff --git a/views/ngXosViews/sampleView/gulp/build.js b/views/ngXosViews/sampleView/gulp/build.js
index 65048e0..714f89f 100644
--- a/views/ngXosViews/sampleView/gulp/build.js
+++ b/views/ngXosViews/sampleView/gulp/build.js
@@ -13,7 +13,7 @@
var uglify = require('gulp-uglify');
var templateCache = require('gulp-angular-templatecache');
var runSequence = require('run-sequence');
-var concat = require('gulp-concat');
+var concat = require('gulp-concat-util');
var del = require('del');
var wiredep = require('wiredep');
var angularFilesort = require('gulp-angular-filesort');
@@ -23,6 +23,13 @@
var rename = require('gulp-rename');
var replace = require('gulp-replace');
+const TEMPLATE_FOOTER = `
+angular.module('xos.sampleView')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
+
module.exports = function(options){
// delete previous builded file
@@ -66,7 +73,7 @@
// copy css in correct folder
gulp.task('copyCss', ['css'], function(){
return gulp.src([`${options.tmp}/css/*.css`])
- .pipe(concat('xosDiagnostic.css'))
+ .pipe(concat('xosSampleView.css'))
.pipe(gulp.dest(options.static + 'css/'))
});
@@ -78,6 +85,8 @@
.pipe(ngAnnotate())
.pipe(angularFilesort())
.pipe(concat('xosSampleView.js'))
+ .pipe(concat.header('//Autogenerated, do not edit!!!\n'))
+ .pipe(concat.footer(TEMPLATE_FOOTER))
.pipe(uglify())
.pipe(gulp.dest(options.static + 'js/'));
});
diff --git a/xos/core/xoslib/dashboards/xosDiagnostic.html b/xos/core/xoslib/dashboards/xosDiagnostic.html
index f988d9a..f87baae 100644
--- a/xos/core/xoslib/dashboards/xosDiagnostic.html
+++ b/xos/core/xoslib/dashboards/xosDiagnostic.html
@@ -4,7 +4,7 @@
<link rel="stylesheet" href="/static/css/xosDiagnostic.css">
<!-- endinject -->
-<div id="xosDiagnostic">
+<div ng-app="xos.diagnostic" id="xosDiagnostic">
<div ui-view></div>
</div>
diff --git a/xos/core/xoslib/dashboards/xosSampleView.html b/xos/core/xoslib/dashboards/xosSampleView.html
index 92d6f9a..64c6f80 100644
--- a/xos/core/xoslib/dashboards/xosSampleView.html
+++ b/xos/core/xoslib/dashboards/xosSampleView.html
@@ -1,14 +1,13 @@
<!-- browserSync -->
<!-- inject:css -->
-<link rel="stylesheet" href="/css/dev.css">
<!-- endinject -->
-<div id="xosSampleView">
+<div ng-app="xos.sampleView" id="xosSampleView" class="container-fluid">
<div ui-view></div>
</div>
<!-- inject:js -->
-<script src="/../../static/js/xosSampleView.js"></script>
+<script src="/static/js/xosSampleView.js"></script>
<!-- endinject -->
diff --git a/xos/core/xoslib/static/css/xosDiagnostic.css b/xos/core/xoslib/static/css/xosDiagnostic.css
index 0c1de20..7aee881 100644
--- a/xos/core/xoslib/static/css/xosDiagnostic.css
+++ b/xos/core/xoslib/static/css/xosDiagnostic.css
@@ -1 +1 @@
-#xosDiagnostic,[ui-view]{min-height:700px;position:relative}diagnostic-container .form-control.small-padding{padding:6px}diagnostic-container .half-height{position:relative;height:50%}diagnostic-container .onethird-height{position:relative;height:33%;border-bottom:1px solid #999}diagnostic-container .twothird-height{position:relative;height:67%}diagnostic-container .subscriber-select{max-width:200px;position:absolute;top:20px;right:20px;z-index:1}diagnostic-container .onethird-height .well,diagnostic-container .twothird-height .well{font-weight:700;max-width:165px;text-align:center;margin-top:15px;background:#eee;border-color:steelblue;padding:10px}diagnostic-container .onethird-height .well.pull-right{position:absolute;right:0;top:-15px;cursor:pointer;z-index:200}subscriber-status-modal .row+.row{margin-top:20px}.half-height+.half-height{border-top:1px solid black}service-topology,logic-topology{height:100%;width:100%;display:block;position:absolute;top:0}logic-topology .subscriber circle,logic-topology .device circle{fill:#fff;stroke:green;stroke-width:1px}logic-topology>svg{position:absolute;top:0}logic-topology .network .cloud{fill:#fff;stroke:green;stroke-width:1px}logic-topology .node.rack>g>rect{fill:#ccc;stroke:steelblue;stroke-width:1px}logic-topology .compute-node>rect{fill:#fff;stroke:steelblue;stroke-width:1px}logic-topology .compute-node>text{font-size:16px}logic-topology .instance>rect{fill:#eee;stroke:steelblue;stroke-width:1px}logic-topology .node .instance.active rect{fill:lightsteelblue;stroke:steelblue;stroke-width:1px}logic-topology .node .instance.active.good>rect{fill:green}logic-topology .node .instance.active.provisioning>rect{fill:yellow}logic-topology .node .instance.active.bad>rect{fill:red}logic-topology .node .instance .stats-container rect{fill:white}logic-topology .node .instance .stats-container text.name{font-weight:700}logic-topology .node .instance .stats-container text.ip{font-style:italic;font-size:10px}logic-topology .node .instance .stats-container .container rect{fill:#eee;stroke:steelblue;stroke-width:1px}.legend{fill:#fff;stroke:#ccc;stroke-width:1px;position:relative}.legend text{stroke:#000}.node{cursor:pointer}.node circle,.node rect{fill:#fff;stroke:steelblue;stroke-width:1px}.node.subscriber circle,.node.subscriber rect,.node.router circle,.node.router rect{stroke:#05ffcb}.node.slice rect{stroke:#b01dff}.node.instance rect{stroke:#ccc}.node.instance rect.active{stroke:#ff8b00}.node rect.slice-detail{fill:#fff;stroke:steelblue;stroke-width:3px}.node text{font:18px sans-serif}.node .instance text{font:12px sans-serif}.node text.small{font-size:10px}.link,.device-link{fill:none;stroke:#ccc;stroke-width:2px}.link.slice{stroke:rgba(157,4,183,.29)}.link.instance{stroke:#ccc}.link.instance.active{stroke:rgba(255,138,0,.65)}.service-details{width:200px;position:absolute;top:20px;right:20px}.animate.ng-hide-remove{animation:.5s bounceInRight ease}.animate.ng-hide-add{animation:.5s bounceOutRight ease}.loader{font-size:10px;margin:150px auto;text-indent:-9999em;width:11em;height:11em;border-radius:50%;background:#fff;background:linear-gradient(to right,#fff 10%,rgba(255,255,255,0) 42%);position:relative;animation:load3 1.4s infinite linear;transform:translateZ(0)}.loader:before{width:50%;height:50%;background:#105e9e;border-radius:100% 0 0;position:absolute;top:0;left:0;content:''}.loader:after{background:#fff;width:75%;height:75%;border-radius:50%;content:'';margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}@keyframes load3{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.modal.fade.in{display:block}@keyframes bounceInRight{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1.000)}from{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}
\ No newline at end of file
+#xosDiagnostic,[ui-view]{min-height:700px;position:relative}diagnostic-container .form-control.small-padding{padding:6px}diagnostic-container .half-height{position:relative;height:50%}diagnostic-container .onethird-height{position:relative;height:33%;border-bottom:1px solid #999}diagnostic-container .twothird-height{position:relative;height:67%}diagnostic-container .subscriber-select{max-width:200px;position:absolute;top:20px;right:20px;z-index:1}diagnostic-container .onethird-height .well,diagnostic-container .twothird-height .well{font-weight:700;max-width:165px;text-align:center;margin-top:15px;background:#eee;border-color:steelblue;padding:10px}diagnostic-container .onethird-height .well.pull-right{position:absolute;right:0;top:-15px;cursor:pointer;z-index:200}subscriber-status-modal .row+.row{margin-top:20px}.half-height+.half-height{border-top:1px solid black}service-topology,logic-topology{height:100%;width:100%;display:block;position:absolute;top:0}logic-topology .subscriber circle,logic-topology .device circle{fill:#fff;stroke:green;stroke-width:1px}logic-topology>svg{position:absolute;top:0}logic-topology .network .cloud{fill:#fff;stroke:green;stroke-width:1px}logic-topology .node.rack>g>rect{fill:#ccc;stroke:steelblue;stroke-width:1px}logic-topology .compute-node>rect{fill:#fff;stroke:steelblue;stroke-width:1px}logic-topology .compute-node>text{font-size:16px}logic-topology .instance>rect{fill:#eee;stroke:steelblue;stroke-width:1px}logic-topology .node .instance.active rect{fill:lightsteelblue;stroke:steelblue;stroke-width:1px}logic-topology .node .instance.active.good>rect{fill:green}logic-topology .node .instance.active.provisioning>rect{fill:yellow}logic-topology .node .instance.active.bad>rect{fill:red}logic-topology .node .instance .stats-container rect{fill:white}logic-topology .node .instance .stats-container text.name{font-weight:700}logic-topology .node .instance .stats-container text.ip{font-style:italic;font-size:10px}logic-topology .node .instance .stats-container .container rect{fill:#eee;stroke:steelblue;stroke-width:1px}.legend{fill:#fff;stroke:#ccc;stroke-width:1px;position:relative}.legend text{stroke:#000}.node{cursor:pointer}.node circle,.node rect{fill:#fff;stroke:steelblue;stroke-width:1px}.node.subscriber circle,.node.subscriber rect,.node.router circle,.node.router rect{stroke:#05ffcb}.node.slice rect{stroke:#b01dff}.node.instance rect{stroke:#ccc}.node.instance rect.active{stroke:#ff8b00}.node rect.slice-detail{fill:#fff;stroke:steelblue;stroke-width:3px}.node text{font:18px sans-serif}.node .instance text{font:12px sans-serif}.node text.small{font-size:10px}.link,.device-link{fill:none;stroke:#ccc;stroke-width:2px}.link.slice{stroke:rgba(157,4,183,.29)}.link.instance{stroke:#ccc}.link.instance.active{stroke:rgba(255,138,0,.65)}.service-details{width:200px;position:absolute;top:20px;right:20px}.animate.ng-hide-remove{animation:.5s bounceInRight ease}.animate.ng-hide-add{animation:.5s bounceOutRight ease}.loader{font-size:10px;margin:150px auto;text-indent:-9999em;width:11em;height:11em;border-radius:50%;background:#fff;background:linear-gradient(to right,#fff 10%,rgba(255,255,255,0) 42%);position:relative;animation:load3 1.4s infinite linear;transform:translateZ(0)}.loader:before{width:50%;height:50%;background:#105e9e;border-radius:100% 0 0;position:absolute;top:0;left:0;content:''}.loader:after{background:#fff;width:75%;height:75%;border-radius:50%;content:'';margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}@keyframes load3{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.modal.fade.in{display:block}@keyframes bounceInRight{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosApi.js b/xos/core/xoslib/static/js/xosApi.js
deleted file mode 100644
index 65d8820..0000000
--- a/xos/core/xoslib/static/js/xosApi.js
+++ /dev/null
@@ -1,51569 +0,0 @@
-/*jshint -W069 */
-/*global angular:false */
-angular.module('xos.hpcapi', [])
- .factory('hpcapi', ['$q', '$http', '$rootScope', function($q, $http, $rootScope) {
- 'use strict';
-
- /**
- *
- * @class hpcapi
- * @param {(string|object)} [domainOrOptions] - The project domain or options object. If object, see the object's optional properties.
- * @param {string} [domainOrOptions.domain] - The project domain
- * @param {string} [domainOrOptions.cache] - An angularjs cache implementation
- * @param {object} [domainOrOptions.token] - auth token - object with value property and optional headerOrQueryName and isQuery properties
- * @param {string} [cache] - An angularjs cache implementation
- */
- var hpcapi = (function() {
- function hpcapi(options, cache) {
- var domain = (typeof options === 'object') ? options.domain : options;
- this.domain = typeof(domain) === 'string' ? domain : 'http://localhost:9999';
- cache = cache || ((typeof options === 'object') ? options.cache : cache);
- this.cache = cache;
- }
-
- hpcapi.prototype.$on = function($scope, path, handler) {
- var url = domain + path;
- $scope.$on(url, function() {
- handler();
- });
- return this;
- };
-
- hpcapi.prototype.$broadcast = function(path) {
- var url = domain + path;
- //cache.remove(url);
- $rootScope.$broadcast(url);
- return this;
- };
-
- hpcapi.transformRequest = function(obj) {
- var str = [];
- for (var p in obj) {
- var val = obj[p];
- if (angular.isArray(val)) {
- val.forEach(function(val) {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- });
- } else {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- }
- }
- return str.join("&");
- };
-
- /**
- *
- * @method
- * @name hpcapi#Hpc_Api_Root_GET
- *
- */
- hpcapi.prototype.Hpc_Api_Root_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_List_GET
- *
- */
- hpcapi.prototype.Hpc_Health_Check_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {choice} kind -
- * @param {string} resource_name -
- * @param {string} result_contains -
- * @param {integer} result_min_size -
- * @param {integer} result_max_size -
- *
- */
- hpcapi.prototype.Hpc_Health_Check_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['resource_name'] !== undefined) {
- form['resource_name'] = parameters['resource_name'];
- }
-
- if (parameters['resource_name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: resource_name'));
- return deferred.promise;
- }
-
- if (parameters['result_contains'] !== undefined) {
- form['result_contains'] = parameters['result_contains'];
- }
-
- if (parameters['result_min_size'] !== undefined) {
- form['result_min_size'] = parameters['result_min_size'];
- }
-
- if (parameters['result_max_size'] !== undefined) {
- form['result_max_size'] = parameters['result_max_size'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Hpc_Health_Check_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {choice} kind -
- * @param {string} resource_name -
- * @param {string} result_contains -
- * @param {integer} result_min_size -
- * @param {integer} result_max_size -
- *
- */
- hpcapi.prototype.Hpc_Health_Check_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['resource_name'] !== undefined) {
- form['resource_name'] = parameters['resource_name'];
- }
-
- if (parameters['resource_name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: resource_name'));
- return deferred.promise;
- }
-
- if (parameters['result_contains'] !== undefined) {
- form['result_contains'] = parameters['result_contains'];
- }
-
- if (parameters['result_min_size'] !== undefined) {
- form['result_min_size'] = parameters['result_min_size'];
- }
-
- if (parameters['result_max_size'] !== undefined) {
- form['result_max_size'] = parameters['result_max_size'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {choice} kind -
- * @param {string} resource_name -
- * @param {string} result_contains -
- * @param {integer} result_min_size -
- * @param {integer} result_max_size -
- *
- */
- hpcapi.prototype.Hpc_Health_Check_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['resource_name'] !== undefined) {
- form['resource_name'] = parameters['resource_name'];
- }
-
- if (parameters['result_contains'] !== undefined) {
- form['result_contains'] = parameters['result_contains'];
- }
-
- if (parameters['result_min_size'] !== undefined) {
- form['result_min_size'] = parameters['result_min_size'];
- }
-
- if (parameters['result_max_size'] !== undefined) {
- form['result_max_size'] = parameters['result_max_size'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Health_Check_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Hpc_Health_Check_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpchealthchecks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_List_GET
- *
- */
- hpcapi.prototype.Hpc_Service_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {string} cmi_hostname -
- * @param {boolean} hpc_port80 - Enable port 80 for HPC
- * @param {string} watcher_hpc_network - Network for hpc_watcher to contact hpc instance
- * @param {string} watcher_dnsdemux_network - Network for hpc_watcher to contact dnsdemux instance
- * @param {string} watcher_dnsredir_network - Network for hpc_watcher to contact dnsredir instance
- *
- */
- hpcapi.prototype.Hpc_Service_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['versionNumber'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: versionNumber'));
- return deferred.promise;
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['cmi_hostname'] !== undefined) {
- form['cmi_hostname'] = parameters['cmi_hostname'];
- }
-
- if (parameters['hpc_port80'] !== undefined) {
- form['hpc_port80'] = parameters['hpc_port80'];
- }
-
- if (parameters['watcher_hpc_network'] !== undefined) {
- form['watcher_hpc_network'] = parameters['watcher_hpc_network'];
- }
-
- if (parameters['watcher_dnsdemux_network'] !== undefined) {
- form['watcher_dnsdemux_network'] = parameters['watcher_dnsdemux_network'];
- }
-
- if (parameters['watcher_dnsredir_network'] !== undefined) {
- form['watcher_dnsredir_network'] = parameters['watcher_dnsredir_network'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Hpc_Service_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {string} cmi_hostname -
- * @param {boolean} hpc_port80 - Enable port 80 for HPC
- * @param {string} watcher_hpc_network - Network for hpc_watcher to contact hpc instance
- * @param {string} watcher_dnsdemux_network - Network for hpc_watcher to contact dnsdemux instance
- * @param {string} watcher_dnsredir_network - Network for hpc_watcher to contact dnsredir instance
- *
- */
- hpcapi.prototype.Hpc_Service_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['versionNumber'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: versionNumber'));
- return deferred.promise;
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['cmi_hostname'] !== undefined) {
- form['cmi_hostname'] = parameters['cmi_hostname'];
- }
-
- if (parameters['hpc_port80'] !== undefined) {
- form['hpc_port80'] = parameters['hpc_port80'];
- }
-
- if (parameters['watcher_hpc_network'] !== undefined) {
- form['watcher_hpc_network'] = parameters['watcher_hpc_network'];
- }
-
- if (parameters['watcher_dnsdemux_network'] !== undefined) {
- form['watcher_dnsdemux_network'] = parameters['watcher_dnsdemux_network'];
- }
-
- if (parameters['watcher_dnsredir_network'] !== undefined) {
- form['watcher_dnsredir_network'] = parameters['watcher_dnsredir_network'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {string} cmi_hostname -
- * @param {boolean} hpc_port80 - Enable port 80 for HPC
- * @param {string} watcher_hpc_network - Network for hpc_watcher to contact hpc instance
- * @param {string} watcher_dnsdemux_network - Network for hpc_watcher to contact dnsdemux instance
- * @param {string} watcher_dnsredir_network - Network for hpc_watcher to contact dnsredir instance
- *
- */
- hpcapi.prototype.Hpc_Service_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['cmi_hostname'] !== undefined) {
- form['cmi_hostname'] = parameters['cmi_hostname'];
- }
-
- if (parameters['hpc_port80'] !== undefined) {
- form['hpc_port80'] = parameters['hpc_port80'];
- }
-
- if (parameters['watcher_hpc_network'] !== undefined) {
- form['watcher_hpc_network'] = parameters['watcher_hpc_network'];
- }
-
- if (parameters['watcher_dnsdemux_network'] !== undefined) {
- form['watcher_dnsdemux_network'] = parameters['watcher_dnsdemux_network'];
- }
-
- if (parameters['watcher_dnsredir_network'] !== undefined) {
- form['watcher_dnsredir_network'] = parameters['watcher_dnsredir_network'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Hpc_Service_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Hpc_Service_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/hpcservices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_List_GET
- *
- */
- hpcapi.prototype.Origin_Server_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} origin_server_id -
- * @param {string} url -
- * @param {string} contentProvider -
- * @param {boolean} authenticated - Status for this Site
- * @param {boolean} enabled - Status for this Site
- * @param {choice} protocol -
- * @param {boolean} redirects - Indicates whether Origin Server redirects should be used for this Origin Server
- * @param {string} description -
- *
- */
- hpcapi.prototype.Origin_Server_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['origin_server_id'] !== undefined) {
- form['origin_server_id'] = parameters['origin_server_id'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['authenticated'] !== undefined) {
- form['authenticated'] = parameters['authenticated'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['protocol'] !== undefined) {
- form['protocol'] = parameters['protocol'];
- }
-
- if (parameters['protocol'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: protocol'));
- return deferred.promise;
- }
-
- if (parameters['redirects'] !== undefined) {
- form['redirects'] = parameters['redirects'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Origin_Server_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} origin_server_id -
- * @param {string} url -
- * @param {string} contentProvider -
- * @param {boolean} authenticated - Status for this Site
- * @param {boolean} enabled - Status for this Site
- * @param {choice} protocol -
- * @param {boolean} redirects - Indicates whether Origin Server redirects should be used for this Origin Server
- * @param {string} description -
- *
- */
- hpcapi.prototype.Origin_Server_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['origin_server_id'] !== undefined) {
- form['origin_server_id'] = parameters['origin_server_id'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['authenticated'] !== undefined) {
- form['authenticated'] = parameters['authenticated'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['protocol'] !== undefined) {
- form['protocol'] = parameters['protocol'];
- }
-
- if (parameters['protocol'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: protocol'));
- return deferred.promise;
- }
-
- if (parameters['redirects'] !== undefined) {
- form['redirects'] = parameters['redirects'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} origin_server_id -
- * @param {string} url -
- * @param {string} contentProvider -
- * @param {boolean} authenticated - Status for this Site
- * @param {boolean} enabled - Status for this Site
- * @param {choice} protocol -
- * @param {boolean} redirects - Indicates whether Origin Server redirects should be used for this Origin Server
- * @param {string} description -
- *
- */
- hpcapi.prototype.Origin_Server_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['origin_server_id'] !== undefined) {
- form['origin_server_id'] = parameters['origin_server_id'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['authenticated'] !== undefined) {
- form['authenticated'] = parameters['authenticated'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['protocol'] !== undefined) {
- form['protocol'] = parameters['protocol'];
- }
-
- if (parameters['redirects'] !== undefined) {
- form['redirects'] = parameters['redirects'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Origin_Server_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Origin_Server_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/originservers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_List_GET
- *
- */
- hpcapi.prototype.Cdn_Prefix_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} cdn_prefix_id -
- * @param {string} prefix - Registered Prefix for Domain
- * @param {string} contentProvider -
- * @param {string} description - Description of Content Provider
- * @param {string} defaultOriginServer -
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Cdn_Prefix_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['cdn_prefix_id'] !== undefined) {
- form['cdn_prefix_id'] = parameters['cdn_prefix_id'];
- }
-
- if (parameters['prefix'] !== undefined) {
- form['prefix'] = parameters['prefix'];
- }
-
- if (parameters['prefix'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: prefix'));
- return deferred.promise;
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['defaultOriginServer'] !== undefined) {
- form['defaultOriginServer'] = parameters['defaultOriginServer'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Cdn_Prefix_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} cdn_prefix_id -
- * @param {string} prefix - Registered Prefix for Domain
- * @param {string} contentProvider -
- * @param {string} description - Description of Content Provider
- * @param {string} defaultOriginServer -
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Cdn_Prefix_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['cdn_prefix_id'] !== undefined) {
- form['cdn_prefix_id'] = parameters['cdn_prefix_id'];
- }
-
- if (parameters['prefix'] !== undefined) {
- form['prefix'] = parameters['prefix'];
- }
-
- if (parameters['prefix'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: prefix'));
- return deferred.promise;
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['defaultOriginServer'] !== undefined) {
- form['defaultOriginServer'] = parameters['defaultOriginServer'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} cdn_prefix_id -
- * @param {string} prefix - Registered Prefix for Domain
- * @param {string} contentProvider -
- * @param {string} description - Description of Content Provider
- * @param {string} defaultOriginServer -
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Cdn_Prefix_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['cdn_prefix_id'] !== undefined) {
- form['cdn_prefix_id'] = parameters['cdn_prefix_id'];
- }
-
- if (parameters['prefix'] !== undefined) {
- form['prefix'] = parameters['prefix'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['defaultOriginServer'] !== undefined) {
- form['defaultOriginServer'] = parameters['defaultOriginServer'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Cdn_Prefix_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Cdn_Prefix_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/cdnprefixs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_List_GET
- *
- */
- hpcapi.prototype.Service_Provider_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {integer} service_provider_id -
- * @param {string} name - Service Provider Name
- * @param {string} description - Description of Service Provider
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Service_Provider_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['hpcService'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: hpcService'));
- return deferred.promise;
- }
-
- if (parameters['service_provider_id'] !== undefined) {
- form['service_provider_id'] = parameters['service_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Service_Provider_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {integer} service_provider_id -
- * @param {string} name - Service Provider Name
- * @param {string} description - Description of Service Provider
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Service_Provider_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['hpcService'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: hpcService'));
- return deferred.promise;
- }
-
- if (parameters['service_provider_id'] !== undefined) {
- form['service_provider_id'] = parameters['service_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} hpcService -
- * @param {integer} service_provider_id -
- * @param {string} name - Service Provider Name
- * @param {string} description - Description of Service Provider
- * @param {boolean} enabled -
- *
- */
- hpcapi.prototype.Service_Provider_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['service_provider_id'] !== undefined) {
- form['service_provider_id'] = parameters['service_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Service_Provider_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Service_Provider_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/serviceproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_List_GET
- *
- */
- hpcapi.prototype.Content_Provider_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} content_provider_id -
- * @param {string} name -
- * @param {boolean} enabled -
- * @param {string} description - Description of Content Provider
- * @param {string} serviceProvider -
- *
- */
- hpcapi.prototype.Content_Provider_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['content_provider_id'] !== undefined) {
- form['content_provider_id'] = parameters['content_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters['serviceProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: serviceProvider'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Content_Provider_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} content_provider_id -
- * @param {string} name -
- * @param {boolean} enabled -
- * @param {string} description - Description of Content Provider
- * @param {string} serviceProvider -
- *
- */
- hpcapi.prototype.Content_Provider_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['content_provider_id'] !== undefined) {
- form['content_provider_id'] = parameters['content_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters['serviceProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: serviceProvider'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {integer} content_provider_id -
- * @param {string} name -
- * @param {boolean} enabled -
- * @param {string} description - Description of Content Provider
- * @param {string} serviceProvider -
- *
- */
- hpcapi.prototype.Content_Provider_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['content_provider_id'] !== undefined) {
- form['content_provider_id'] = parameters['content_provider_id'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Content_Provider_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Content_Provider_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/contentproviders/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_List_GET
- *
- */
- hpcapi.prototype.Access_Map_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} name - Name of the Access Map
- * @param {string} description -
- * @param {string} map - specifies which client requests are allowed
- *
- */
- hpcapi.prototype.Access_Map_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters['map'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: map'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Access_Map_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} name - Name of the Access Map
- * @param {string} description -
- * @param {string} map - specifies which client requests are allowed
- *
- */
- hpcapi.prototype.Access_Map_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['contentProvider'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: contentProvider'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters['map'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: map'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} name - Name of the Access Map
- * @param {string} description -
- * @param {string} map - specifies which client requests are allowed
- *
- */
- hpcapi.prototype.Access_Map_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Access_Map_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Access_Map_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/accessmaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_List_GET
- *
- */
- hpcapi.prototype.Site_Map_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} serviceProvider -
- * @param {string} cdnPrefix -
- * @param {string} hpcService -
- * @param {string} name - Name of the Site Map
- * @param {string} description -
- * @param {string} map - specifies how to map requests to hpc instances
- * @param {integer} map_id -
- *
- */
- hpcapi.prototype.Site_Map_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters['cdnPrefix'] !== undefined) {
- form['cdnPrefix'] = parameters['cdnPrefix'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters['map'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: map'));
- return deferred.promise;
- }
-
- if (parameters['map_id'] !== undefined) {
- form['map_id'] = parameters['map_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_Detail_GET
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Site_Map_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} serviceProvider -
- * @param {string} cdnPrefix -
- * @param {string} hpcService -
- * @param {string} name - Name of the Site Map
- * @param {string} description -
- * @param {string} map - specifies how to map requests to hpc instances
- * @param {integer} map_id -
- *
- */
- hpcapi.prototype.Site_Map_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters['cdnPrefix'] !== undefined) {
- form['cdnPrefix'] = parameters['cdnPrefix'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters['map'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: map'));
- return deferred.promise;
- }
-
- if (parameters['map_id'] !== undefined) {
- form['map_id'] = parameters['map_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} contentProvider -
- * @param {string} serviceProvider -
- * @param {string} cdnPrefix -
- * @param {string} hpcService -
- * @param {string} name - Name of the Site Map
- * @param {string} description -
- * @param {string} map - specifies how to map requests to hpc instances
- * @param {integer} map_id -
- *
- */
- hpcapi.prototype.Site_Map_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['contentProvider'] !== undefined) {
- form['contentProvider'] = parameters['contentProvider'];
- }
-
- if (parameters['serviceProvider'] !== undefined) {
- form['serviceProvider'] = parameters['serviceProvider'];
- }
-
- if (parameters['cdnPrefix'] !== undefined) {
- form['cdnPrefix'] = parameters['cdnPrefix'];
- }
-
- if (parameters['hpcService'] !== undefined) {
- form['hpcService'] = parameters['hpcService'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['map'] !== undefined) {
- form['map'] = parameters['map'];
- }
-
- if (parameters['map_id'] !== undefined) {
- form['map_id'] = parameters['map_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name hpcapi#Site_Map_Detail_DELETE
- * @param {string} pk -
- *
- */
- hpcapi.prototype.Site_Map_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/hpcapi/sitemaps/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = hpcapi.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
-
- return hpcapi;
- })();
-
- return hpcapi;
- }]);/*jshint -W069 */
-/*global angular:false */
-angular.module('xos.xos', [])
- .factory('xos', ['$q', '$http', '$rootScope', function($q, $http, $rootScope) {
- 'use strict';
-
- /**
- *
- * @class xos
- * @param {(string|object)} [domainOrOptions] - The project domain or options object. If object, see the object's optional properties.
- * @param {string} [domainOrOptions.domain] - The project domain
- * @param {string} [domainOrOptions.cache] - An angularjs cache implementation
- * @param {object} [domainOrOptions.token] - auth token - object with value property and optional headerOrQueryName and isQuery properties
- * @param {string} [cache] - An angularjs cache implementation
- */
- var xos = (function() {
- function xos(options, cache) {
- var domain = (typeof options === 'object') ? options.domain : options;
- this.domain = typeof(domain) === 'string' ? domain : 'http://localhost:9999';
- cache = cache || ((typeof options === 'object') ? options.cache : cache);
- this.cache = cache;
- }
-
- xos.prototype.$on = function($scope, path, handler) {
- var url = domain + path;
- $scope.$on(url, function() {
- handler();
- });
- return this;
- };
-
- xos.prototype.$broadcast = function(path) {
- var url = domain + path;
- //cache.remove(url);
- $rootScope.$broadcast(url);
- return this;
- };
-
- xos.transformRequest = function(obj) {
- var str = [];
- for (var p in obj) {
- var val = obj[p];
- if (angular.isArray(val)) {
- val.forEach(function(val) {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- });
- } else {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- }
- }
- return str.join("&");
- };
-
- /**
- *
- * @method
- * @name xos#Api_Root_GET
- *
- */
- xos.prototype.Api_Root_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_List_GET
- *
- */
- xos.prototype.Site_Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Site_Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Site_Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Site_Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/site_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_List_GET
- *
- */
- xos.prototype.Service_Attribute_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Attribute Name
- * @param {string} value - Attribute Value
- * @param {string} service - The Service this attribute is associated with
- *
- */
- xos.prototype.Service_Attribute_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Attribute_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Attribute Name
- * @param {string} value - Attribute Value
- * @param {string} service - The Service this attribute is associated with
- *
- */
- xos.prototype.Service_Attribute_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Attribute Name
- * @param {string} value - Attribute Value
- * @param {string} service - The Service this attribute is associated with
- *
- */
- xos.prototype.Service_Attribute_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Attribute_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Attribute_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceattributes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_List_GET
- *
- */
- xos.prototype.Controller_Images_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} controller -
- * @param {string} glance_image_id - Glance image id
- *
- */
- xos.prototype.Controller_Images_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['glance_image_id'] !== undefined) {
- form['glance_image_id'] = parameters['glance_image_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Images_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} controller -
- * @param {string} glance_image_id - Glance image id
- *
- */
- xos.prototype.Controller_Images_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['glance_image_id'] !== undefined) {
- form['glance_image_id'] = parameters['glance_image_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} controller -
- * @param {string} glance_image_id - Glance image id
- *
- */
- xos.prototype.Controller_Images_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['glance_image_id'] !== undefined) {
- form['glance_image_id'] = parameters['glance_image_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Images_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Images_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerimages/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_List_GET
- *
- */
- xos.prototype.Controller_Site_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} site_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Site_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['site_privilege'] !== undefined) {
- form['site_privilege'] = parameters['site_privilege'];
- }
-
- if (parameters['site_privilege'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site_privilege'));
- return deferred.promise;
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Site_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} site_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Site_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['site_privilege'] !== undefined) {
- form['site_privilege'] = parameters['site_privilege'];
- }
-
- if (parameters['site_privilege'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site_privilege'));
- return deferred.promise;
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} site_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Site_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['site_privilege'] !== undefined) {
- form['site_privilege'] = parameters['site_privilege'];
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Site_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersiteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_List_GET
- *
- */
- xos.prototype.Image_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} disk_format -
- * @param {string} container_format -
- * @param {string} path - Path to image on local disk
- *
- */
- xos.prototype.Image_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['disk_format'] !== undefined) {
- form['disk_format'] = parameters['disk_format'];
- }
-
- if (parameters['disk_format'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: disk_format'));
- return deferred.promise;
- }
-
- if (parameters['container_format'] !== undefined) {
- form['container_format'] = parameters['container_format'];
- }
-
- if (parameters['container_format'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: container_format'));
- return deferred.promise;
- }
-
- if (parameters['path'] !== undefined) {
- form['path'] = parameters['path'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Image_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} disk_format -
- * @param {string} container_format -
- * @param {string} path - Path to image on local disk
- *
- */
- xos.prototype.Image_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['disk_format'] !== undefined) {
- form['disk_format'] = parameters['disk_format'];
- }
-
- if (parameters['disk_format'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: disk_format'));
- return deferred.promise;
- }
-
- if (parameters['container_format'] !== undefined) {
- form['container_format'] = parameters['container_format'];
- }
-
- if (parameters['container_format'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: container_format'));
- return deferred.promise;
- }
-
- if (parameters['path'] !== undefined) {
- form['path'] = parameters['path'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} disk_format -
- * @param {string} container_format -
- * @param {string} path - Path to image on local disk
- *
- */
- xos.prototype.Image_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['disk_format'] !== undefined) {
- form['disk_format'] = parameters['disk_format'];
- }
-
- if (parameters['container_format'] !== undefined) {
- form['container_format'] = parameters['container_format'];
- }
-
- if (parameters['path'] !== undefined) {
- form['path'] = parameters['path'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Image_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/images/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_List_GET
- *
- */
- xos.prototype.Network_Parameter_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} parameter - The type of the parameter
- * @param {string} value - The value of this parameter
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Network_Parameter_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['parameter'] !== undefined) {
- form['parameter'] = parameters['parameter'];
- }
-
- if (parameters['parameter'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: parameter'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters['object_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Parameter_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} parameter - The type of the parameter
- * @param {string} value - The value of this parameter
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Network_Parameter_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['parameter'] !== undefined) {
- form['parameter'] = parameters['parameter'];
- }
-
- if (parameters['parameter'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: parameter'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters['object_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} parameter - The type of the parameter
- * @param {string} value - The value of this parameter
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Network_Parameter_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['parameter'] !== undefined) {
- form['parameter'] = parameters['parameter'];
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Parameter_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparameters/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_List_GET
- *
- */
- xos.prototype.Site_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name for this Site
- * @param {string} site_url - Site's Home URL Page
- * @param {boolean} enabled - Status for this Site
- * @param {boolean} hosts_nodes - Indicates whether or not the site host nodes
- * @param {boolean} hosts_users - Indicates whether or not the site manages user accounts
- * @param {string} location -
- * @param {number} longitude -
- * @param {number} latitude -
- * @param {string} login_base - Prefix for Slices associated with this Site
- * @param {boolean} is_public - Indicates the visibility of this site to other members
- * @param {string} abbreviated_name -
- *
- */
- xos.prototype.Site_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['site_url'] !== undefined) {
- form['site_url'] = parameters['site_url'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['hosts_nodes'] !== undefined) {
- form['hosts_nodes'] = parameters['hosts_nodes'];
- }
-
- if (parameters['hosts_users'] !== undefined) {
- form['hosts_users'] = parameters['hosts_users'];
- }
-
- if (parameters['location'] !== undefined) {
- form['location'] = parameters['location'];
- }
-
- if (parameters['location'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: location'));
- return deferred.promise;
- }
-
- if (parameters['longitude'] !== undefined) {
- form['longitude'] = parameters['longitude'];
- }
-
- if (parameters['latitude'] !== undefined) {
- form['latitude'] = parameters['latitude'];
- }
-
- if (parameters['login_base'] !== undefined) {
- form['login_base'] = parameters['login_base'];
- }
-
- if (parameters['login_base'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: login_base'));
- return deferred.promise;
- }
-
- if (parameters['is_public'] !== undefined) {
- form['is_public'] = parameters['is_public'];
- }
-
- if (parameters['abbreviated_name'] !== undefined) {
- form['abbreviated_name'] = parameters['abbreviated_name'];
- }
-
- if (parameters['abbreviated_name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: abbreviated_name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name for this Site
- * @param {string} site_url - Site's Home URL Page
- * @param {boolean} enabled - Status for this Site
- * @param {boolean} hosts_nodes - Indicates whether or not the site host nodes
- * @param {boolean} hosts_users - Indicates whether or not the site manages user accounts
- * @param {string} location -
- * @param {number} longitude -
- * @param {number} latitude -
- * @param {string} login_base - Prefix for Slices associated with this Site
- * @param {boolean} is_public - Indicates the visibility of this site to other members
- * @param {string} abbreviated_name -
- *
- */
- xos.prototype.Site_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['site_url'] !== undefined) {
- form['site_url'] = parameters['site_url'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['hosts_nodes'] !== undefined) {
- form['hosts_nodes'] = parameters['hosts_nodes'];
- }
-
- if (parameters['hosts_users'] !== undefined) {
- form['hosts_users'] = parameters['hosts_users'];
- }
-
- if (parameters['location'] !== undefined) {
- form['location'] = parameters['location'];
- }
-
- if (parameters['location'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: location'));
- return deferred.promise;
- }
-
- if (parameters['longitude'] !== undefined) {
- form['longitude'] = parameters['longitude'];
- }
-
- if (parameters['latitude'] !== undefined) {
- form['latitude'] = parameters['latitude'];
- }
-
- if (parameters['login_base'] !== undefined) {
- form['login_base'] = parameters['login_base'];
- }
-
- if (parameters['login_base'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: login_base'));
- return deferred.promise;
- }
-
- if (parameters['is_public'] !== undefined) {
- form['is_public'] = parameters['is_public'];
- }
-
- if (parameters['abbreviated_name'] !== undefined) {
- form['abbreviated_name'] = parameters['abbreviated_name'];
- }
-
- if (parameters['abbreviated_name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: abbreviated_name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name for this Site
- * @param {string} site_url - Site's Home URL Page
- * @param {boolean} enabled - Status for this Site
- * @param {boolean} hosts_nodes - Indicates whether or not the site host nodes
- * @param {boolean} hosts_users - Indicates whether or not the site manages user accounts
- * @param {string} location -
- * @param {number} longitude -
- * @param {number} latitude -
- * @param {string} login_base - Prefix for Slices associated with this Site
- * @param {boolean} is_public - Indicates the visibility of this site to other members
- * @param {string} abbreviated_name -
- *
- */
- xos.prototype.Site_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['site_url'] !== undefined) {
- form['site_url'] = parameters['site_url'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['hosts_nodes'] !== undefined) {
- form['hosts_nodes'] = parameters['hosts_nodes'];
- }
-
- if (parameters['hosts_users'] !== undefined) {
- form['hosts_users'] = parameters['hosts_users'];
- }
-
- if (parameters['location'] !== undefined) {
- form['location'] = parameters['location'];
- }
-
- if (parameters['longitude'] !== undefined) {
- form['longitude'] = parameters['longitude'];
- }
-
- if (parameters['latitude'] !== undefined) {
- form['latitude'] = parameters['latitude'];
- }
-
- if (parameters['login_base'] !== undefined) {
- form['login_base'] = parameters['login_base'];
- }
-
- if (parameters['is_public'] !== undefined) {
- form['is_public'] = parameters['is_public'];
- }
-
- if (parameters['abbreviated_name'] !== undefined) {
- form['abbreviated_name'] = parameters['abbreviated_name'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_List_GET
- *
- */
- xos.prototype.Tenant_Root_Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Tenant_Root_Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Tenant_Root_Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Tenant_Root_Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_List_GET
- *
- */
- xos.prototype.Slice_Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Slice_Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Slice_Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {choice} role -
- *
- */
- xos.prototype.Slice_Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_List_GET
- *
- */
- xos.prototype.Tag_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} service - The Service this Tag is associated with
- * @param {string} name - The name of this tag
- * @param {string} value - The value of this tag
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Tag_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters['object_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tag_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} service - The Service this Tag is associated with
- * @param {string} name - The name of this tag
- * @param {string} value - The value of this tag
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Tag_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters['object_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} service - The Service this Tag is associated with
- * @param {string} name - The name of this tag
- * @param {string} value - The value of this tag
- * @param {string} content_type -
- * @param {integer} object_id -
- *
- */
- xos.prototype.Tag_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['object_id'] !== undefined) {
- form['object_id'] = parameters['object_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tag_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tag_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_List_GET
- *
- */
- xos.prototype.Invoice_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} date -
- * @param {string} account -
- *
- */
- xos.prototype.Invoice_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Invoice_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} date -
- * @param {string} account -
- *
- */
- xos.prototype.Invoice_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} date -
- * @param {string} account -
- *
- */
- xos.prototype.Invoice_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Invoice_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Invoice_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/invoices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_List_GET
- *
- */
- xos.prototype.Slice_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} slice -
- * @param {string} role -
- *
- */
- xos.prototype.Slice_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} slice -
- * @param {string} role -
- *
- */
- xos.prototype.Slice_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} slice -
- * @param {string} role -
- *
- */
- xos.prototype.Slice_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slice_privileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_List_GET
- *
- */
- xos.prototype.Flavor_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - name of this flavor, as displayed to users
- * @param {string} description -
- * @param {string} flavor - flavor string used to configure deployments
- * @param {integer} order - used to order flavors when displayed in a list
- * @param {boolean} default - make this a default flavor to use when creating new instances
- *
- */
- xos.prototype.Flavor_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['flavor'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: flavor'));
- return deferred.promise;
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters['order'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: order'));
- return deferred.promise;
- }
-
- if (parameters['default'] !== undefined) {
- form['default'] = parameters['default'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Flavor_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - name of this flavor, as displayed to users
- * @param {string} description -
- * @param {string} flavor - flavor string used to configure deployments
- * @param {integer} order - used to order flavors when displayed in a list
- * @param {boolean} default - make this a default flavor to use when creating new instances
- *
- */
- xos.prototype.Flavor_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['flavor'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: flavor'));
- return deferred.promise;
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters['order'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: order'));
- return deferred.promise;
- }
-
- if (parameters['default'] !== undefined) {
- form['default'] = parameters['default'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - name of this flavor, as displayed to users
- * @param {string} description -
- * @param {string} flavor - flavor string used to configure deployments
- * @param {integer} order - used to order flavors when displayed in a list
- * @param {boolean} default - make this a default flavor to use when creating new instances
- *
- */
- xos.prototype.Flavor_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters['default'] !== undefined) {
- form['default'] = parameters['default'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Flavor_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Flavor_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/flavors/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_List_GET
- *
- */
- xos.prototype.Port_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} instance -
- * @param {string} ip - Instance ip address
- * @param {string} port_id - Quantum port id
- * @param {string} mac - MAC address associated with this port
- *
- */
- xos.prototype.Port_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['port_id'] !== undefined) {
- form['port_id'] = parameters['port_id'];
- }
-
- if (parameters['mac'] !== undefined) {
- form['mac'] = parameters['mac'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Port_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} instance -
- * @param {string} ip - Instance ip address
- * @param {string} port_id - Quantum port id
- * @param {string} mac - MAC address associated with this port
- *
- */
- xos.prototype.Port_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['port_id'] !== undefined) {
- form['port_id'] = parameters['port_id'];
- }
-
- if (parameters['mac'] !== undefined) {
- form['mac'] = parameters['mac'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} instance -
- * @param {string} ip - Instance ip address
- * @param {string} port_id - Quantum port id
- * @param {string} mac - MAC address associated with this port
- *
- */
- xos.prototype.Port_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['port_id'] !== undefined) {
- form['port_id'] = parameters['port_id'];
- }
-
- if (parameters['mac'] !== undefined) {
- form['mac'] = parameters['mac'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Port_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Port_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/ports/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_List_GET
- *
- */
- xos.prototype.Controller_Site_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} controller -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Site_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Site_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} controller -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Site_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} controller -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Site_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Site_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Site_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersites/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_List_GET
- *
- */
- xos.prototype.Project_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of Project
- *
- */
- xos.prototype.Project_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Project_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of Project
- *
- */
- xos.prototype.Project_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of Project
- *
- */
- xos.prototype.Project_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Project_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Project_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/projects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_List_GET
- *
- */
- xos.prototype.Slice_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} default_flavor -
- * @param {string} default_image -
- * @param {string} mount_data_sets -
- *
- */
- xos.prototype.Slice_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['max_instances'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: max_instances'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} default_flavor -
- * @param {string} default_image -
- * @param {string} mount_data_sets -
- *
- */
- xos.prototype.Slice_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['max_instances'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: max_instances'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} default_flavor -
- * @param {string} default_image -
- * @param {string} mount_data_sets -
- *
- */
- xos.prototype.Slice_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_List_GET
- *
- */
- xos.prototype.Network_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} template -
- * @param {string} subnet -
- * @param {string} ports -
- * @param {string} labels -
- * @param {string} owner - Slice that owns control of this Network
- * @param {integer} guaranteed_bandwidth -
- * @param {boolean} permit_all_slices -
- * @param {string} topology_parameters -
- * @param {string} controller_url -
- * @param {string} controller_parameters -
- * @param {string} network_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {boolean} autoconnect - This network can be autoconnected to the slice that owns it
- *
- */
- xos.prototype.Network_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['template'] !== undefined) {
- form['template'] = parameters['template'];
- }
-
- if (parameters['template'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: template'));
- return deferred.promise;
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters['ports'] !== undefined) {
- form['ports'] = parameters['ports'];
- }
-
- if (parameters['labels'] !== undefined) {
- form['labels'] = parameters['labels'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['owner'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: owner'));
- return deferred.promise;
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['guaranteed_bandwidth'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: guaranteed_bandwidth'));
- return deferred.promise;
- }
-
- if (parameters['permit_all_slices'] !== undefined) {
- form['permit_all_slices'] = parameters['permit_all_slices'];
- }
-
- if (parameters['topology_parameters'] !== undefined) {
- form['topology_parameters'] = parameters['topology_parameters'];
- }
-
- if (parameters['controller_url'] !== undefined) {
- form['controller_url'] = parameters['controller_url'];
- }
-
- if (parameters['controller_parameters'] !== undefined) {
- form['controller_parameters'] = parameters['controller_parameters'];
- }
-
- if (parameters['network_id'] !== undefined) {
- form['network_id'] = parameters['network_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['autoconnect'] !== undefined) {
- form['autoconnect'] = parameters['autoconnect'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} template -
- * @param {string} subnet -
- * @param {string} ports -
- * @param {string} labels -
- * @param {string} owner - Slice that owns control of this Network
- * @param {integer} guaranteed_bandwidth -
- * @param {boolean} permit_all_slices -
- * @param {string} topology_parameters -
- * @param {string} controller_url -
- * @param {string} controller_parameters -
- * @param {string} network_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {boolean} autoconnect - This network can be autoconnected to the slice that owns it
- *
- */
- xos.prototype.Network_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['template'] !== undefined) {
- form['template'] = parameters['template'];
- }
-
- if (parameters['template'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: template'));
- return deferred.promise;
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters['ports'] !== undefined) {
- form['ports'] = parameters['ports'];
- }
-
- if (parameters['labels'] !== undefined) {
- form['labels'] = parameters['labels'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['owner'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: owner'));
- return deferred.promise;
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['guaranteed_bandwidth'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: guaranteed_bandwidth'));
- return deferred.promise;
- }
-
- if (parameters['permit_all_slices'] !== undefined) {
- form['permit_all_slices'] = parameters['permit_all_slices'];
- }
-
- if (parameters['topology_parameters'] !== undefined) {
- form['topology_parameters'] = parameters['topology_parameters'];
- }
-
- if (parameters['controller_url'] !== undefined) {
- form['controller_url'] = parameters['controller_url'];
- }
-
- if (parameters['controller_parameters'] !== undefined) {
- form['controller_parameters'] = parameters['controller_parameters'];
- }
-
- if (parameters['network_id'] !== undefined) {
- form['network_id'] = parameters['network_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['autoconnect'] !== undefined) {
- form['autoconnect'] = parameters['autoconnect'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} template -
- * @param {string} subnet -
- * @param {string} ports -
- * @param {string} labels -
- * @param {string} owner - Slice that owns control of this Network
- * @param {integer} guaranteed_bandwidth -
- * @param {boolean} permit_all_slices -
- * @param {string} topology_parameters -
- * @param {string} controller_url -
- * @param {string} controller_parameters -
- * @param {string} network_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {boolean} autoconnect - This network can be autoconnected to the slice that owns it
- *
- */
- xos.prototype.Network_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['template'] !== undefined) {
- form['template'] = parameters['template'];
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters['ports'] !== undefined) {
- form['ports'] = parameters['ports'];
- }
-
- if (parameters['labels'] !== undefined) {
- form['labels'] = parameters['labels'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['permit_all_slices'] !== undefined) {
- form['permit_all_slices'] = parameters['permit_all_slices'];
- }
-
- if (parameters['topology_parameters'] !== undefined) {
- form['topology_parameters'] = parameters['topology_parameters'];
- }
-
- if (parameters['controller_url'] !== undefined) {
- form['controller_url'] = parameters['controller_url'];
- }
-
- if (parameters['controller_parameters'] !== undefined) {
- form['controller_parameters'] = parameters['controller_parameters'];
- }
-
- if (parameters['network_id'] !== undefined) {
- form['network_id'] = parameters['network_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['autoconnect'] !== undefined) {
- form['autoconnect'] = parameters['autoconnect'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_List_GET
- *
- */
- xos.prototype.Service_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- *
- */
- xos.prototype.Service_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['versionNumber'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: versionNumber'));
- return deferred.promise;
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- *
- */
- xos.prototype.Service_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['versionNumber'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: versionNumber'));
- return deferred.promise;
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} description - Description of Service
- * @param {boolean} enabled -
- * @param {string} kind - Kind of service
- * @param {string} name - Service Name
- * @param {string} versionNumber - Version of Service Definition
- * @param {boolean} published -
- * @param {string} view_url -
- * @param {string} icon_url -
- * @param {string} public_key - Public key string
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- *
- */
- xos.prototype.Service_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['versionNumber'] !== undefined) {
- form['versionNumber'] = parameters['versionNumber'];
- }
-
- if (parameters['published'] !== undefined) {
- form['published'] = parameters['published'];
- }
-
- if (parameters['view_url'] !== undefined) {
- form['view_url'] = parameters['view_url'];
- }
-
- if (parameters['icon_url'] !== undefined) {
- form['icon_url'] = parameters['icon_url'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/services/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_List_GET
- *
- */
- xos.prototype.Service_Class_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} commitment -
- * @param {integer} membershipFee -
- * @param {integer} membershipFeeMonths -
- * @param {boolean} upgradeRequiresApproval -
- *
- */
- xos.prototype.Service_Class_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters['commitment'] !== undefined) {
- form['commitment'] = parameters['commitment'];
- }
-
- if (parameters['commitment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: commitment'));
- return deferred.promise;
- }
-
- if (parameters['membershipFee'] !== undefined) {
- form['membershipFee'] = parameters['membershipFee'];
- }
-
- if (parameters['membershipFee'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: membershipFee'));
- return deferred.promise;
- }
-
- if (parameters['membershipFeeMonths'] !== undefined) {
- form['membershipFeeMonths'] = parameters['membershipFeeMonths'];
- }
-
- if (parameters['membershipFeeMonths'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: membershipFeeMonths'));
- return deferred.promise;
- }
-
- if (parameters['upgradeRequiresApproval'] !== undefined) {
- form['upgradeRequiresApproval'] = parameters['upgradeRequiresApproval'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Class_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} commitment -
- * @param {integer} membershipFee -
- * @param {integer} membershipFeeMonths -
- * @param {boolean} upgradeRequiresApproval -
- *
- */
- xos.prototype.Service_Class_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters['commitment'] !== undefined) {
- form['commitment'] = parameters['commitment'];
- }
-
- if (parameters['commitment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: commitment'));
- return deferred.promise;
- }
-
- if (parameters['membershipFee'] !== undefined) {
- form['membershipFee'] = parameters['membershipFee'];
- }
-
- if (parameters['membershipFee'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: membershipFee'));
- return deferred.promise;
- }
-
- if (parameters['membershipFeeMonths'] !== undefined) {
- form['membershipFeeMonths'] = parameters['membershipFeeMonths'];
- }
-
- if (parameters['membershipFeeMonths'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: membershipFeeMonths'));
- return deferred.promise;
- }
-
- if (parameters['upgradeRequiresApproval'] !== undefined) {
- form['upgradeRequiresApproval'] = parameters['upgradeRequiresApproval'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} commitment -
- * @param {integer} membershipFee -
- * @param {integer} membershipFeeMonths -
- * @param {boolean} upgradeRequiresApproval -
- *
- */
- xos.prototype.Service_Class_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['commitment'] !== undefined) {
- form['commitment'] = parameters['commitment'];
- }
-
- if (parameters['membershipFee'] !== undefined) {
- form['membershipFee'] = parameters['membershipFee'];
- }
-
- if (parameters['membershipFeeMonths'] !== undefined) {
- form['membershipFeeMonths'] = parameters['membershipFeeMonths'];
- }
-
- if (parameters['upgradeRequiresApproval'] !== undefined) {
- form['upgradeRequiresApproval'] = parameters['upgradeRequiresApproval'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Class_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Class_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceclasses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_List_GET
- *
- */
- xos.prototype.Payment_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {number} amount -
- * @param {string} date -
- *
- */
- xos.prototype.Payment_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['amount'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: amount'));
- return deferred.promise;
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Payment_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {number} amount -
- * @param {string} date -
- *
- */
- xos.prototype.Payment_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['amount'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: amount'));
- return deferred.promise;
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {number} amount -
- * @param {string} date -
- *
- */
- xos.prototype.Payment_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Payment_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Payment_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/payments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_List_GET
- *
- */
- xos.prototype.Subscriber_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Subscriber_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Subscriber_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Subscriber_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Subscriber_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Subscriber_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Subscriber_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/subscribers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_List_GET
- *
- */
- xos.prototype.Instance_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance_id - Nova instance id
- * @param {string} instance_uuid - Nova instance uuid
- * @param {string} name - Instance name
- * @param {string} instance_name - OpenStack generated name
- * @param {string} ip - Instance ip address
- * @param {string} image -
- * @param {string} creator -
- * @param {string} slice -
- * @param {string} deployment -
- * @param {string} node -
- * @param {integer} numberCores - Number of cores for instance
- * @param {string} flavor - Flavor of this instance
- * @param {string} userData - user_data passed to instance during creation
- *
- */
- xos.prototype.Instance_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance_id'] !== undefined) {
- form['instance_id'] = parameters['instance_id'];
- }
-
- if (parameters['instance_uuid'] !== undefined) {
- form['instance_uuid'] = parameters['instance_uuid'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['instance_name'] !== undefined) {
- form['instance_name'] = parameters['instance_name'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['node'] !== undefined) {
- form['node'] = parameters['node'];
- }
-
- if (parameters['node'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: node'));
- return deferred.promise;
- }
-
- if (parameters['numberCores'] !== undefined) {
- form['numberCores'] = parameters['numberCores'];
- }
-
- if (parameters['numberCores'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: numberCores'));
- return deferred.promise;
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['flavor'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: flavor'));
- return deferred.promise;
- }
-
- if (parameters['userData'] !== undefined) {
- form['userData'] = parameters['userData'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Instance_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance_id - Nova instance id
- * @param {string} instance_uuid - Nova instance uuid
- * @param {string} name - Instance name
- * @param {string} instance_name - OpenStack generated name
- * @param {string} ip - Instance ip address
- * @param {string} image -
- * @param {string} creator -
- * @param {string} slice -
- * @param {string} deployment -
- * @param {string} node -
- * @param {integer} numberCores - Number of cores for instance
- * @param {string} flavor - Flavor of this instance
- * @param {string} userData - user_data passed to instance during creation
- *
- */
- xos.prototype.Instance_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance_id'] !== undefined) {
- form['instance_id'] = parameters['instance_id'];
- }
-
- if (parameters['instance_uuid'] !== undefined) {
- form['instance_uuid'] = parameters['instance_uuid'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['instance_name'] !== undefined) {
- form['instance_name'] = parameters['instance_name'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['node'] !== undefined) {
- form['node'] = parameters['node'];
- }
-
- if (parameters['node'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: node'));
- return deferred.promise;
- }
-
- if (parameters['numberCores'] !== undefined) {
- form['numberCores'] = parameters['numberCores'];
- }
-
- if (parameters['numberCores'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: numberCores'));
- return deferred.promise;
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['flavor'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: flavor'));
- return deferred.promise;
- }
-
- if (parameters['userData'] !== undefined) {
- form['userData'] = parameters['userData'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance_id - Nova instance id
- * @param {string} instance_uuid - Nova instance uuid
- * @param {string} name - Instance name
- * @param {string} instance_name - OpenStack generated name
- * @param {string} ip - Instance ip address
- * @param {string} image -
- * @param {string} creator -
- * @param {string} slice -
- * @param {string} deployment -
- * @param {string} node -
- * @param {integer} numberCores - Number of cores for instance
- * @param {string} flavor - Flavor of this instance
- * @param {string} userData - user_data passed to instance during creation
- *
- */
- xos.prototype.Instance_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance_id'] !== undefined) {
- form['instance_id'] = parameters['instance_id'];
- }
-
- if (parameters['instance_uuid'] !== undefined) {
- form['instance_uuid'] = parameters['instance_uuid'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['instance_name'] !== undefined) {
- form['instance_name'] = parameters['instance_name'];
- }
-
- if (parameters['ip'] !== undefined) {
- form['ip'] = parameters['ip'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['node'] !== undefined) {
- form['node'] = parameters['node'];
- }
-
- if (parameters['numberCores'] !== undefined) {
- form['numberCores'] = parameters['numberCores'];
- }
-
- if (parameters['flavor'] !== undefined) {
- form['flavor'] = parameters['flavor'];
- }
-
- if (parameters['userData'] !== undefined) {
- form['userData'] = parameters['userData'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Instance_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Instance_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/instances/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_List_GET
- *
- */
- xos.prototype.Charge_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {string} slice -
- * @param {choice} kind -
- * @param {choice} state -
- * @param {string} date -
- * @param {string} object -
- * @param {number} amount -
- * @param {number} coreHours -
- * @param {string} invoice -
- *
- */
- xos.prototype.Charge_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['state'] !== undefined) {
- form['state'] = parameters['state'];
- }
-
- if (parameters['state'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: state'));
- return deferred.promise;
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters['object'] !== undefined) {
- form['object'] = parameters['object'];
- }
-
- if (parameters['object'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object'));
- return deferred.promise;
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['amount'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: amount'));
- return deferred.promise;
- }
-
- if (parameters['coreHours'] !== undefined) {
- form['coreHours'] = parameters['coreHours'];
- }
-
- if (parameters['coreHours'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: coreHours'));
- return deferred.promise;
- }
-
- if (parameters['invoice'] !== undefined) {
- form['invoice'] = parameters['invoice'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Charge_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {string} slice -
- * @param {choice} kind -
- * @param {choice} state -
- * @param {string} date -
- * @param {string} object -
- * @param {number} amount -
- * @param {number} coreHours -
- * @param {string} invoice -
- *
- */
- xos.prototype.Charge_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['account'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: account'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['state'] !== undefined) {
- form['state'] = parameters['state'];
- }
-
- if (parameters['state'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: state'));
- return deferred.promise;
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['date'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: date'));
- return deferred.promise;
- }
-
- if (parameters['object'] !== undefined) {
- form['object'] = parameters['object'];
- }
-
- if (parameters['object'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: object'));
- return deferred.promise;
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['amount'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: amount'));
- return deferred.promise;
- }
-
- if (parameters['coreHours'] !== undefined) {
- form['coreHours'] = parameters['coreHours'];
- }
-
- if (parameters['coreHours'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: coreHours'));
- return deferred.promise;
- }
-
- if (parameters['invoice'] !== undefined) {
- form['invoice'] = parameters['invoice'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} account -
- * @param {string} slice -
- * @param {choice} kind -
- * @param {choice} state -
- * @param {string} date -
- * @param {string} object -
- * @param {number} amount -
- * @param {number} coreHours -
- * @param {string} invoice -
- *
- */
- xos.prototype.Charge_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['account'] !== undefined) {
- form['account'] = parameters['account'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['state'] !== undefined) {
- form['state'] = parameters['state'];
- }
-
- if (parameters['date'] !== undefined) {
- form['date'] = parameters['date'];
- }
-
- if (parameters['object'] !== undefined) {
- form['object'] = parameters['object'];
- }
-
- if (parameters['amount'] !== undefined) {
- form['amount'] = parameters['amount'];
- }
-
- if (parameters['coreHours'] !== undefined) {
- form['coreHours'] = parameters['coreHours'];
- }
-
- if (parameters['invoice'] !== undefined) {
- form['invoice'] = parameters['invoice'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Charge_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Charge_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/charges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_List_GET
- *
- */
- xos.prototype.Program_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Service Name
- * @param {string} description - Description of Service
-
- * @param {choice} command - Command to run
- * @param {string} owner -
- * @param {string} contents - Contents of Program
- * @param {string} output - Output of Program
- * @param {string} messages - Debug messages
- * @param {string} status - Status of program
- *
- */
- xos.prototype.Program_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- form['kind'] = 'tosca';
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['command'] !== undefined) {
- form['command'] = parameters['command'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['contents'] !== undefined) {
- form['contents'] = parameters['contents'];
- }
-
- if (parameters['output'] !== undefined) {
- form['output'] = parameters['output'];
- }
-
- if (parameters['messages'] !== undefined) {
- form['messages'] = parameters['messages'];
- }
-
- if (parameters['status'] !== undefined) {
- form['status'] = parameters['status'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Program_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Service Name
- * @param {string} description - Description of Service
-
- * @param {choice} command - Command to run
- * @param {string} owner -
- * @param {string} contents - Contents of Program
- * @param {string} output - Output of Program
- * @param {string} messages - Debug messages
- * @param {string} status - Status of program
- *
- */
- xos.prototype.Program_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- form['kind'] = 'tosca';
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['command'] !== undefined) {
- form['command'] = parameters['command'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['contents'] !== undefined) {
- form['contents'] = parameters['contents'];
- }
-
- if (parameters['output'] !== undefined) {
- form['output'] = parameters['output'];
- }
-
- if (parameters['messages'] !== undefined) {
- form['messages'] = parameters['messages'];
- }
-
- if (parameters['status'] !== undefined) {
- form['status'] = parameters['status'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Service Name
- * @param {string} description - Description of Service
-
- * @param {choice} command - Command to run
- * @param {string} owner -
- * @param {string} contents - Contents of Program
- * @param {string} output - Output of Program
- * @param {string} messages - Debug messages
- * @param {string} status - Status of program
- *
- */
- xos.prototype.Program_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- form['kind'] = 'tosca';
-
- if (parameters['command'] !== undefined) {
- form['command'] = parameters['command'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['contents'] !== undefined) {
- form['contents'] = parameters['contents'];
- }
-
- if (parameters['output'] !== undefined) {
- form['output'] = parameters['output'];
- }
-
- if (parameters['messages'] !== undefined) {
- form['messages'] = parameters['messages'];
- }
-
- if (parameters['status'] !== undefined) {
- form['status'] = parameters['status'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Program_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Program_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/programs/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_List_GET
- *
- */
- xos.prototype.Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} role_type -
- * @param {string} role -
- * @param {string} description -
- * @param {string} content_type -
- *
- */
- xos.prototype.Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role_type'] !== undefined) {
- form['role_type'] = parameters['role_type'];
- }
-
- if (parameters['role_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role_type'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} role_type -
- * @param {string} role -
- * @param {string} description -
- * @param {string} content_type -
- *
- */
- xos.prototype.Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role_type'] !== undefined) {
- form['role_type'] = parameters['role_type'];
- }
-
- if (parameters['role_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role_type'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters['content_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: content_type'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} role_type -
- * @param {string} role -
- * @param {string} description -
- * @param {string} content_type -
- *
- */
- xos.prototype.Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['role_type'] !== undefined) {
- form['role_type'] = parameters['role_type'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['content_type'] !== undefined) {
- form['content_type'] = parameters['content_type'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/roles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_List_GET
- *
- */
- xos.prototype.Usable_Object_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- *
- */
- xos.prototype.Usable_Object_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Usable_Object_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- *
- */
- xos.prototype.Usable_Object_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- *
- */
- xos.prototype.Usable_Object_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Usable_Object_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Usable_Object_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usableobjects/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_List_GET
- *
- */
- xos.prototype.Provider_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Provider_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Provider_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Provider_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Provider_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Provider_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Provider_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/providers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_List_GET
- *
- */
- xos.prototype.Slice_Credential_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Slice_Credential_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Credential_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Slice_Credential_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Slice_Credential_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Credential_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Credential_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_List_GET
- *
- */
- xos.prototype.Node_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Node
- * @param {string} site_deployment -
- * @param {string} site -
- *
- */
- xos.prototype.Node_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['site_deployment'] !== undefined) {
- form['site_deployment'] = parameters['site_deployment'];
- }
-
- if (parameters['site_deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site_deployment'));
- return deferred.promise;
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Node_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Node
- * @param {string} site_deployment -
- * @param {string} site -
- *
- */
- xos.prototype.Node_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['site_deployment'] !== undefined) {
- form['site_deployment'] = parameters['site_deployment'];
- }
-
- if (parameters['site_deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site_deployment'));
- return deferred.promise;
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Node
- * @param {string} site_deployment -
- * @param {string} site -
- *
- */
- xos.prototype.Node_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['site_deployment'] !== undefined) {
- form['site_deployment'] = parameters['site_deployment'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Node_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Node_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/nodes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_List_GET
- *
- */
- xos.prototype.Dashboard_View_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the View
- * @param {string} url - URL of Dashboard
- * @param {boolean} enabled -
- *
- */
- xos.prototype.Dashboard_View_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Dashboard_View_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the View
- * @param {string} url - URL of Dashboard
- * @param {boolean} enabled -
- *
- */
- xos.prototype.Dashboard_View_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the View
- * @param {string} url - URL of Dashboard
- * @param {boolean} enabled -
- *
- */
- xos.prototype.Dashboard_View_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Dashboard_View_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Dashboard_View_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/dashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_List_GET
- *
- */
- xos.prototype.Controller_Network_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} controller -
- * @param {string} net_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {string} subnet -
- *
- */
- xos.prototype.Controller_Network_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['net_id'] !== undefined) {
- form['net_id'] = parameters['net_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Network_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} controller -
- * @param {string} net_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {string} subnet -
- *
- */
- xos.prototype.Controller_Network_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['net_id'] !== undefined) {
- form['net_id'] = parameters['net_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} controller -
- * @param {string} net_id - Quantum network
- * @param {string} router_id - Quantum router id
- * @param {string} subnet_id - Quantum subnet id
- * @param {string} subnet -
- *
- */
- xos.prototype.Controller_Network_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['net_id'] !== undefined) {
- form['net_id'] = parameters['net_id'];
- }
-
- if (parameters['router_id'] !== undefined) {
- form['router_id'] = parameters['router_id'];
- }
-
- if (parameters['subnet_id'] !== undefined) {
- form['subnet_id'] = parameters['subnet_id'];
- }
-
- if (parameters['subnet'] !== undefined) {
- form['subnet'] = parameters['subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Network_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Network_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllernetworks/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_List_GET
- *
- */
- xos.prototype.Image_Deployments_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} deployment -
- *
- */
- xos.prototype.Image_Deployments_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Image_Deployments_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} deployment -
- *
- */
- xos.prototype.Image_Deployments_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['image'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: image'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} image -
- * @param {string} deployment -
- *
- */
- xos.prototype.Image_Deployments_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['image'] !== undefined) {
- form['image'] = parameters['image'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Image_Deployments_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Image_Deployments_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/imagedeploymentses/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_List_GET
- *
- */
- xos.prototype.Controller_User_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} controller -
- * @param {string} kuser_id - Keystone user id
- *
- */
- xos.prototype.Controller_User_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['kuser_id'] !== undefined) {
- form['kuser_id'] = parameters['kuser_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_User_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} controller -
- * @param {string} kuser_id - Keystone user id
- *
- */
- xos.prototype.Controller_User_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['kuser_id'] !== undefined) {
- form['kuser_id'] = parameters['kuser_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} controller -
- * @param {string} kuser_id - Keystone user id
- *
- */
- xos.prototype.Controller_User_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['kuser_id'] !== undefined) {
- form['kuser_id'] = parameters['kuser_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_User_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_User_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerusers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_List_GET
- *
- */
- xos.prototype.Reserved_Resource_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance -
- * @param {string} resource -
- * @param {integer} quantity -
- * @param {string} reservationSet -
- *
- */
- xos.prototype.Reserved_Resource_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['instance'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: instance'));
- return deferred.promise;
- }
-
- if (parameters['resource'] !== undefined) {
- form['resource'] = parameters['resource'];
- }
-
- if (parameters['resource'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: resource'));
- return deferred.promise;
- }
-
- if (parameters['quantity'] !== undefined) {
- form['quantity'] = parameters['quantity'];
- }
-
- if (parameters['quantity'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: quantity'));
- return deferred.promise;
- }
-
- if (parameters['reservationSet'] !== undefined) {
- form['reservationSet'] = parameters['reservationSet'];
- }
-
- if (parameters['reservationSet'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: reservationSet'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Reserved_Resource_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance -
- * @param {string} resource -
- * @param {integer} quantity -
- * @param {string} reservationSet -
- *
- */
- xos.prototype.Reserved_Resource_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['instance'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: instance'));
- return deferred.promise;
- }
-
- if (parameters['resource'] !== undefined) {
- form['resource'] = parameters['resource'];
- }
-
- if (parameters['resource'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: resource'));
- return deferred.promise;
- }
-
- if (parameters['quantity'] !== undefined) {
- form['quantity'] = parameters['quantity'];
- }
-
- if (parameters['quantity'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: quantity'));
- return deferred.promise;
- }
-
- if (parameters['reservationSet'] !== undefined) {
- form['reservationSet'] = parameters['reservationSet'];
- }
-
- if (parameters['reservationSet'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: reservationSet'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} instance -
- * @param {string} resource -
- * @param {integer} quantity -
- * @param {string} reservationSet -
- *
- */
- xos.prototype.Reserved_Resource_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['instance'] !== undefined) {
- form['instance'] = parameters['instance'];
- }
-
- if (parameters['resource'] !== undefined) {
- form['resource'] = parameters['resource'];
- }
-
- if (parameters['quantity'] !== undefined) {
- form['quantity'] = parameters['quantity'];
- }
-
- if (parameters['reservationSet'] !== undefined) {
- form['reservationSet'] = parameters['reservationSet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reserved_Resource_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Reserved_Resource_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservedresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_List_GET
- *
- */
- xos.prototype.Network_Template_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} guaranteed_bandwidth -
- * @param {choice} visibility -
- * @param {choice} translation -
- * @param {string} shared_network_name -
- * @param {string} shared_network_id - Quantum network
- * @param {choice} topology_kind -
- * @param {choice} controller_kind -
- *
- */
- xos.prototype.Network_Template_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['guaranteed_bandwidth'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: guaranteed_bandwidth'));
- return deferred.promise;
- }
-
- if (parameters['visibility'] !== undefined) {
- form['visibility'] = parameters['visibility'];
- }
-
- if (parameters['visibility'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: visibility'));
- return deferred.promise;
- }
-
- if (parameters['translation'] !== undefined) {
- form['translation'] = parameters['translation'];
- }
-
- if (parameters['translation'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: translation'));
- return deferred.promise;
- }
-
- if (parameters['shared_network_name'] !== undefined) {
- form['shared_network_name'] = parameters['shared_network_name'];
- }
-
- if (parameters['shared_network_id'] !== undefined) {
- form['shared_network_id'] = parameters['shared_network_id'];
- }
-
- if (parameters['topology_kind'] !== undefined) {
- form['topology_kind'] = parameters['topology_kind'];
- }
-
- if (parameters['topology_kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: topology_kind'));
- return deferred.promise;
- }
-
- if (parameters['controller_kind'] !== undefined) {
- form['controller_kind'] = parameters['controller_kind'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Template_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} guaranteed_bandwidth -
- * @param {choice} visibility -
- * @param {choice} translation -
- * @param {string} shared_network_name -
- * @param {string} shared_network_id - Quantum network
- * @param {choice} topology_kind -
- * @param {choice} controller_kind -
- *
- */
- xos.prototype.Network_Template_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['guaranteed_bandwidth'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: guaranteed_bandwidth'));
- return deferred.promise;
- }
-
- if (parameters['visibility'] !== undefined) {
- form['visibility'] = parameters['visibility'];
- }
-
- if (parameters['visibility'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: visibility'));
- return deferred.promise;
- }
-
- if (parameters['translation'] !== undefined) {
- form['translation'] = parameters['translation'];
- }
-
- if (parameters['translation'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: translation'));
- return deferred.promise;
- }
-
- if (parameters['shared_network_name'] !== undefined) {
- form['shared_network_name'] = parameters['shared_network_name'];
- }
-
- if (parameters['shared_network_id'] !== undefined) {
- form['shared_network_id'] = parameters['shared_network_id'];
- }
-
- if (parameters['topology_kind'] !== undefined) {
- form['topology_kind'] = parameters['topology_kind'];
- }
-
- if (parameters['topology_kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: topology_kind'));
- return deferred.promise;
- }
-
- if (parameters['controller_kind'] !== undefined) {
- form['controller_kind'] = parameters['controller_kind'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} description -
- * @param {integer} guaranteed_bandwidth -
- * @param {choice} visibility -
- * @param {choice} translation -
- * @param {string} shared_network_name -
- * @param {string} shared_network_id - Quantum network
- * @param {choice} topology_kind -
- * @param {choice} controller_kind -
- *
- */
- xos.prototype.Network_Template_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['guaranteed_bandwidth'] !== undefined) {
- form['guaranteed_bandwidth'] = parameters['guaranteed_bandwidth'];
- }
-
- if (parameters['visibility'] !== undefined) {
- form['visibility'] = parameters['visibility'];
- }
-
- if (parameters['translation'] !== undefined) {
- form['translation'] = parameters['translation'];
- }
-
- if (parameters['shared_network_name'] !== undefined) {
- form['shared_network_name'] = parameters['shared_network_name'];
- }
-
- if (parameters['shared_network_id'] !== undefined) {
- form['shared_network_id'] = parameters['shared_network_id'];
- }
-
- if (parameters['topology_kind'] !== undefined) {
- form['topology_kind'] = parameters['topology_kind'];
- }
-
- if (parameters['controller_kind'] !== undefined) {
- form['controller_kind'] = parameters['controller_kind'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Template_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Template_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networktemplates/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_List_GET
- *
- */
- xos.prototype.Network_Slice_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} slice -
- *
- */
- xos.prototype.Network_Slice_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Slice_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} slice -
- *
- */
- xos.prototype.Network_Slice_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['network'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: network'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} network -
- * @param {string} slice -
- *
- */
- xos.prototype.Network_Slice_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Slice_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Slice_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_List_GET
- *
- */
- xos.prototype.User_Dashboard_View_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} dashboardView -
- * @param {integer} order -
- *
- */
- xos.prototype.User_Dashboard_View_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['dashboardView'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: dashboardView'));
- return deferred.promise;
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters['order'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: order'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.User_Dashboard_View_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} dashboardView -
- * @param {integer} order -
- *
- */
- xos.prototype.User_Dashboard_View_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['dashboardView'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: dashboardView'));
- return deferred.promise;
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters['order'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: order'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} dashboardView -
- * @param {integer} order -
- *
- */
- xos.prototype.User_Dashboard_View_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['order'] !== undefined) {
- form['order'] = parameters['order'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Dashboard_View_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.User_Dashboard_View_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/userdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_List_GET
- *
- */
- xos.prototype.Controller_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Controller
- * @param {string} backend_type - Type of compute controller, e.g. EC2, OpenStack, or OpenStack version
- * @param {string} version - Controller version
- * @param {string} auth_url - Auth url for the compute controller
- * @param {string} admin_user - Username of an admin user at this controller
- * @param {string} admin_password - Password of theadmin user at this controller
- * @param {string} admin_tenant - Name of the tenant the admin user belongs to
- * @param {string} domain - Name of the domain this controller belongs to
- * @param {string} rabbit_host - IP address of rabbitmq server at this controller
- * @param {string} rabbit_user - Username of rabbitmq server at this controller
- * @param {string} rabbit_password - Password of rabbitmq server at this controller
- * @param {string} deployment -
- *
- */
- xos.prototype.Controller_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['backend_type'] !== undefined) {
- form['backend_type'] = parameters['backend_type'];
- }
-
- if (parameters['backend_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_type'));
- return deferred.promise;
- }
-
- if (parameters['version'] !== undefined) {
- form['version'] = parameters['version'];
- }
-
- if (parameters['version'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: version'));
- return deferred.promise;
- }
-
- if (parameters['auth_url'] !== undefined) {
- form['auth_url'] = parameters['auth_url'];
- }
-
- if (parameters['admin_user'] !== undefined) {
- form['admin_user'] = parameters['admin_user'];
- }
-
- if (parameters['admin_password'] !== undefined) {
- form['admin_password'] = parameters['admin_password'];
- }
-
- if (parameters['admin_tenant'] !== undefined) {
- form['admin_tenant'] = parameters['admin_tenant'];
- }
-
- if (parameters['domain'] !== undefined) {
- form['domain'] = parameters['domain'];
- }
-
- if (parameters['rabbit_host'] !== undefined) {
- form['rabbit_host'] = parameters['rabbit_host'];
- }
-
- if (parameters['rabbit_user'] !== undefined) {
- form['rabbit_user'] = parameters['rabbit_user'];
- }
-
- if (parameters['rabbit_password'] !== undefined) {
- form['rabbit_password'] = parameters['rabbit_password'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Controller
- * @param {string} backend_type - Type of compute controller, e.g. EC2, OpenStack, or OpenStack version
- * @param {string} version - Controller version
- * @param {string} auth_url - Auth url for the compute controller
- * @param {string} admin_user - Username of an admin user at this controller
- * @param {string} admin_password - Password of theadmin user at this controller
- * @param {string} admin_tenant - Name of the tenant the admin user belongs to
- * @param {string} domain - Name of the domain this controller belongs to
- * @param {string} rabbit_host - IP address of rabbitmq server at this controller
- * @param {string} rabbit_user - Username of rabbitmq server at this controller
- * @param {string} rabbit_password - Password of rabbitmq server at this controller
- * @param {string} deployment -
- *
- */
- xos.prototype.Controller_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['backend_type'] !== undefined) {
- form['backend_type'] = parameters['backend_type'];
- }
-
- if (parameters['backend_type'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_type'));
- return deferred.promise;
- }
-
- if (parameters['version'] !== undefined) {
- form['version'] = parameters['version'];
- }
-
- if (parameters['version'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: version'));
- return deferred.promise;
- }
-
- if (parameters['auth_url'] !== undefined) {
- form['auth_url'] = parameters['auth_url'];
- }
-
- if (parameters['admin_user'] !== undefined) {
- form['admin_user'] = parameters['admin_user'];
- }
-
- if (parameters['admin_password'] !== undefined) {
- form['admin_password'] = parameters['admin_password'];
- }
-
- if (parameters['admin_tenant'] !== undefined) {
- form['admin_tenant'] = parameters['admin_tenant'];
- }
-
- if (parameters['domain'] !== undefined) {
- form['domain'] = parameters['domain'];
- }
-
- if (parameters['rabbit_host'] !== undefined) {
- form['rabbit_host'] = parameters['rabbit_host'];
- }
-
- if (parameters['rabbit_user'] !== undefined) {
- form['rabbit_user'] = parameters['rabbit_user'];
- }
-
- if (parameters['rabbit_password'] !== undefined) {
- form['rabbit_password'] = parameters['rabbit_password'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Controller
- * @param {string} backend_type - Type of compute controller, e.g. EC2, OpenStack, or OpenStack version
- * @param {string} version - Controller version
- * @param {string} auth_url - Auth url for the compute controller
- * @param {string} admin_user - Username of an admin user at this controller
- * @param {string} admin_password - Password of theadmin user at this controller
- * @param {string} admin_tenant - Name of the tenant the admin user belongs to
- * @param {string} domain - Name of the domain this controller belongs to
- * @param {string} rabbit_host - IP address of rabbitmq server at this controller
- * @param {string} rabbit_user - Username of rabbitmq server at this controller
- * @param {string} rabbit_password - Password of rabbitmq server at this controller
- * @param {string} deployment -
- *
- */
- xos.prototype.Controller_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['backend_type'] !== undefined) {
- form['backend_type'] = parameters['backend_type'];
- }
-
- if (parameters['version'] !== undefined) {
- form['version'] = parameters['version'];
- }
-
- if (parameters['auth_url'] !== undefined) {
- form['auth_url'] = parameters['auth_url'];
- }
-
- if (parameters['admin_user'] !== undefined) {
- form['admin_user'] = parameters['admin_user'];
- }
-
- if (parameters['admin_password'] !== undefined) {
- form['admin_password'] = parameters['admin_password'];
- }
-
- if (parameters['admin_tenant'] !== undefined) {
- form['admin_tenant'] = parameters['admin_tenant'];
- }
-
- if (parameters['domain'] !== undefined) {
- form['domain'] = parameters['domain'];
- }
-
- if (parameters['rabbit_host'] !== undefined) {
- form['rabbit_host'] = parameters['rabbit_host'];
- }
-
- if (parameters['rabbit_user'] !== undefined) {
- form['rabbit_user'] = parameters['rabbit_user'];
- }
-
- if (parameters['rabbit_password'] !== undefined) {
- form['rabbit_password'] = parameters['rabbit_password'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_List_GET
- *
- */
- xos.prototype.User_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_List_POST
- * @param {string} password -
- * @param {string} last_login -
- * @param {string} email -
- * @param {string} username -
- * @param {string} firstname - person's given name
- * @param {string} lastname - person's surname
- * @param {string} phone - phone number contact
- * @param {string} user_url -
- * @param {string} site - Site this user will be homed too
- * @param {string} public_key - Public key string
- * @param {boolean} is_active -
- * @param {boolean} is_admin -
- * @param {boolean} is_staff -
- * @param {boolean} is_readonly -
- * @param {boolean} is_registering -
- * @param {boolean} is_appuser -
- * @param {string} login_page - send this user to a specific page on login
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {choice} timezone -
- *
- */
- xos.prototype.User_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['password'] !== undefined) {
- form['password'] = parameters['password'];
- }
-
- if (parameters['password'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: password'));
- return deferred.promise;
- }
-
- if (parameters['last_login'] !== undefined) {
- form['last_login'] = parameters['last_login'];
- }
-
- if (parameters['last_login'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: last_login'));
- return deferred.promise;
- }
-
- if (parameters['email'] !== undefined) {
- form['email'] = parameters['email'];
- }
-
- if (parameters['email'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: email'));
- return deferred.promise;
- }
-
- if (parameters['username'] !== undefined) {
- form['username'] = parameters['username'];
- }
-
- if (parameters['username'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: username'));
- return deferred.promise;
- }
-
- if (parameters['firstname'] !== undefined) {
- form['firstname'] = parameters['firstname'];
- }
-
- if (parameters['firstname'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firstname'));
- return deferred.promise;
- }
-
- if (parameters['lastname'] !== undefined) {
- form['lastname'] = parameters['lastname'];
- }
-
- if (parameters['lastname'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: lastname'));
- return deferred.promise;
- }
-
- if (parameters['phone'] !== undefined) {
- form['phone'] = parameters['phone'];
- }
-
- if (parameters['user_url'] !== undefined) {
- form['user_url'] = parameters['user_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['is_active'] !== undefined) {
- form['is_active'] = parameters['is_active'];
- }
-
- if (parameters['is_admin'] !== undefined) {
- form['is_admin'] = parameters['is_admin'];
- }
-
- if (parameters['is_staff'] !== undefined) {
- form['is_staff'] = parameters['is_staff'];
- }
-
- if (parameters['is_readonly'] !== undefined) {
- form['is_readonly'] = parameters['is_readonly'];
- }
-
- if (parameters['is_registering'] !== undefined) {
- form['is_registering'] = parameters['is_registering'];
- }
-
- if (parameters['is_appuser'] !== undefined) {
- form['is_appuser'] = parameters['is_appuser'];
- }
-
- if (parameters['login_page'] !== undefined) {
- form['login_page'] = parameters['login_page'];
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['timezone'] !== undefined) {
- form['timezone'] = parameters['timezone'];
- }
-
- if (parameters['timezone'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: timezone'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.User_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Detail_PUT
- * @param {string} pk -
- * @param {string} password -
- * @param {string} last_login -
- * @param {string} email -
- * @param {string} username -
- * @param {string} firstname - person's given name
- * @param {string} lastname - person's surname
- * @param {string} phone - phone number contact
- * @param {string} user_url -
- * @param {string} site - Site this user will be homed too
- * @param {string} public_key - Public key string
- * @param {boolean} is_active -
- * @param {boolean} is_admin -
- * @param {boolean} is_staff -
- * @param {boolean} is_readonly -
- * @param {boolean} is_registering -
- * @param {boolean} is_appuser -
- * @param {string} login_page - send this user to a specific page on login
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {choice} timezone -
- *
- */
- xos.prototype.User_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['password'] !== undefined) {
- form['password'] = parameters['password'];
- }
-
- if (parameters['password'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: password'));
- return deferred.promise;
- }
-
- if (parameters['last_login'] !== undefined) {
- form['last_login'] = parameters['last_login'];
- }
-
- if (parameters['last_login'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: last_login'));
- return deferred.promise;
- }
-
- if (parameters['email'] !== undefined) {
- form['email'] = parameters['email'];
- }
-
- if (parameters['email'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: email'));
- return deferred.promise;
- }
-
- if (parameters['username'] !== undefined) {
- form['username'] = parameters['username'];
- }
-
- if (parameters['username'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: username'));
- return deferred.promise;
- }
-
- if (parameters['firstname'] !== undefined) {
- form['firstname'] = parameters['firstname'];
- }
-
- if (parameters['firstname'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firstname'));
- return deferred.promise;
- }
-
- if (parameters['lastname'] !== undefined) {
- form['lastname'] = parameters['lastname'];
- }
-
- if (parameters['lastname'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: lastname'));
- return deferred.promise;
- }
-
- if (parameters['phone'] !== undefined) {
- form['phone'] = parameters['phone'];
- }
-
- if (parameters['user_url'] !== undefined) {
- form['user_url'] = parameters['user_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['is_active'] !== undefined) {
- form['is_active'] = parameters['is_active'];
- }
-
- if (parameters['is_admin'] !== undefined) {
- form['is_admin'] = parameters['is_admin'];
- }
-
- if (parameters['is_staff'] !== undefined) {
- form['is_staff'] = parameters['is_staff'];
- }
-
- if (parameters['is_readonly'] !== undefined) {
- form['is_readonly'] = parameters['is_readonly'];
- }
-
- if (parameters['is_registering'] !== undefined) {
- form['is_registering'] = parameters['is_registering'];
- }
-
- if (parameters['is_appuser'] !== undefined) {
- form['is_appuser'] = parameters['is_appuser'];
- }
-
- if (parameters['login_page'] !== undefined) {
- form['login_page'] = parameters['login_page'];
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['timezone'] !== undefined) {
- form['timezone'] = parameters['timezone'];
- }
-
- if (parameters['timezone'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: timezone'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Detail_PATCH
- * @param {string} pk -
- * @param {string} password -
- * @param {string} last_login -
- * @param {string} email -
- * @param {string} username -
- * @param {string} firstname - person's given name
- * @param {string} lastname - person's surname
- * @param {string} phone - phone number contact
- * @param {string} user_url -
- * @param {string} site - Site this user will be homed too
- * @param {string} public_key - Public key string
- * @param {boolean} is_active -
- * @param {boolean} is_admin -
- * @param {boolean} is_staff -
- * @param {boolean} is_readonly -
- * @param {boolean} is_registering -
- * @param {boolean} is_appuser -
- * @param {string} login_page - send this user to a specific page on login
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {choice} timezone -
- *
- */
- xos.prototype.User_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['password'] !== undefined) {
- form['password'] = parameters['password'];
- }
-
- if (parameters['last_login'] !== undefined) {
- form['last_login'] = parameters['last_login'];
- }
-
- if (parameters['email'] !== undefined) {
- form['email'] = parameters['email'];
- }
-
- if (parameters['username'] !== undefined) {
- form['username'] = parameters['username'];
- }
-
- if (parameters['firstname'] !== undefined) {
- form['firstname'] = parameters['firstname'];
- }
-
- if (parameters['lastname'] !== undefined) {
- form['lastname'] = parameters['lastname'];
- }
-
- if (parameters['phone'] !== undefined) {
- form['phone'] = parameters['phone'];
- }
-
- if (parameters['user_url'] !== undefined) {
- form['user_url'] = parameters['user_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['public_key'] !== undefined) {
- form['public_key'] = parameters['public_key'];
- }
-
- if (parameters['is_active'] !== undefined) {
- form['is_active'] = parameters['is_active'];
- }
-
- if (parameters['is_admin'] !== undefined) {
- form['is_admin'] = parameters['is_admin'];
- }
-
- if (parameters['is_staff'] !== undefined) {
- form['is_staff'] = parameters['is_staff'];
- }
-
- if (parameters['is_readonly'] !== undefined) {
- form['is_readonly'] = parameters['is_readonly'];
- }
-
- if (parameters['is_registering'] !== undefined) {
- form['is_registering'] = parameters['is_registering'];
- }
-
- if (parameters['is_appuser'] !== undefined) {
- form['is_appuser'] = parameters['is_appuser'];
- }
-
- if (parameters['login_page'] !== undefined) {
- form['login_page'] = parameters['login_page'];
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['timezone'] !== undefined) {
- form['timezone'] = parameters['timezone'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.User_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/users/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_List_GET
- *
- */
- xos.prototype.Deployment_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Deployment
- * @param {string} accessControl - Access control list that specifies which sites/users may use nodes in this deployment
- *
- */
- xos.prototype.Deployment_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['accessControl'] !== undefined) {
- form['accessControl'] = parameters['accessControl'];
- }
-
- if (parameters['accessControl'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: accessControl'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Deployment
- * @param {string} accessControl - Access control list that specifies which sites/users may use nodes in this deployment
- *
- */
- xos.prototype.Deployment_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['accessControl'] !== undefined) {
- form['accessControl'] = parameters['accessControl'];
- }
-
- if (parameters['accessControl'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: accessControl'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - Name of the Deployment
- * @param {string} accessControl - Access control list that specifies which sites/users may use nodes in this deployment
- *
- */
- xos.prototype.Deployment_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['accessControl'] !== undefined) {
- form['accessControl'] = parameters['accessControl'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_List_GET
- *
- */
- xos.prototype.Reservation_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} startTime -
- * @param {string} slice -
- * @param {integer} duration -
- *
- */
- xos.prototype.Reservation_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['startTime'] !== undefined) {
- form['startTime'] = parameters['startTime'];
- }
-
- if (parameters['startTime'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: startTime'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['duration'] !== undefined) {
- form['duration'] = parameters['duration'];
- }
-
- if (parameters['duration'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: duration'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Reservation_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} startTime -
- * @param {string} slice -
- * @param {integer} duration -
- *
- */
- xos.prototype.Reservation_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['startTime'] !== undefined) {
- form['startTime'] = parameters['startTime'];
- }
-
- if (parameters['startTime'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: startTime'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['duration'] !== undefined) {
- form['duration'] = parameters['duration'];
- }
-
- if (parameters['duration'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: duration'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} startTime -
- * @param {string} slice -
- * @param {integer} duration -
- *
- */
- xos.prototype.Reservation_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['startTime'] !== undefined) {
- form['startTime'] = parameters['startTime'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['duration'] !== undefined) {
- form['duration'] = parameters['duration'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Reservation_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Reservation_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/reservations/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_List_GET
- *
- */
- xos.prototype.Site_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} site -
- * @param {string} role -
- *
- */
- xos.prototype.Site_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} site -
- * @param {string} role -
- *
- */
- xos.prototype.Site_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} site -
- * @param {string} role -
- *
- */
- xos.prototype.Site_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/siteprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_List_GET
- *
- */
- xos.prototype.Controller_Slice_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Slice_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Slice_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Slice_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice -
- * @param {string} tenant_id - Keystone tenant id
- *
- */
- xos.prototype.Controller_Slice_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['tenant_id'] !== undefined) {
- form['tenant_id'] = parameters['tenant_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Slice_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerslices/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_List_GET
- *
- */
- xos.prototype.Tenant_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_List_GET
- *
- */
- xos.prototype.Controller_Dashboard_View_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} dashboardView -
- * @param {boolean} enabled -
- * @param {string} url - URL of Dashboard
- *
- */
- xos.prototype.Controller_Dashboard_View_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['dashboardView'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: dashboardView'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Dashboard_View_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} dashboardView -
- * @param {boolean} enabled -
- * @param {string} url - URL of Dashboard
- *
- */
- xos.prototype.Controller_Dashboard_View_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['dashboardView'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: dashboardView'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters['url'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} dashboardView -
- * @param {boolean} enabled -
- * @param {string} url - URL of Dashboard
- *
- */
- xos.prototype.Controller_Dashboard_View_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['dashboardView'] !== undefined) {
- form['dashboardView'] = parameters['dashboardView'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['url'] !== undefined) {
- form['url'] = parameters['url'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Dashboard_View_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Dashboard_View_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerdashboardviews/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_List_GET
- *
- */
- xos.prototype.Account_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - Site for this account
- *
- */
- xos.prototype.Account_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Account_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - Site for this account
- *
- */
- xos.prototype.Account_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - Site for this account
- *
- */
- xos.prototype.Account_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Account_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Account_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/accounts/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_List_GET
- *
- */
- xos.prototype.Tenant_Root_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Tenant_Root_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Tenant_Root_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} name - name
- * @param {string} service_specific_attribute -
- * @param {string} service_specific_id -
- *
- */
- xos.prototype.Tenant_Root_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantroots/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_List_GET
- *
- */
- xos.prototype.Controller_Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Controller_Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Controller_Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Controller_Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllerroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_List_GET
- *
- */
- xos.prototype.Network_Parameter_Type_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The name of this parameter
- * @param {string} description -
- *
- */
- xos.prototype.Network_Parameter_Type_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Parameter_Type_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The name of this parameter
- * @param {string} description -
- *
- */
- xos.prototype.Network_Parameter_Type_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['description'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: description'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name - The name of this parameter
- * @param {string} description -
- *
- */
- xos.prototype.Network_Parameter_Type_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Network_Parameter_Type_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Network_Parameter_Type_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/networkparametertypes/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_List_GET
- *
- */
- xos.prototype.Site_Credential_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Site_Credential_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Credential_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Site_Credential_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.Site_Credential_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Credential_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Credential_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitecredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_List_GET
- *
- */
- xos.prototype.Deployment_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} deployment -
- * @param {string} role -
- *
- */
- xos.prototype.Deployment_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} deployment -
- * @param {string} role -
- *
- */
- xos.prototype.Deployment_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} deployment -
- * @param {string} role -
- *
- */
- xos.prototype.Deployment_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_List_GET
- *
- */
- xos.prototype.Controller_Slice_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Slice_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['slice_privilege'] !== undefined) {
- form['slice_privilege'] = parameters['slice_privilege'];
- }
-
- if (parameters['slice_privilege'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice_privilege'));
- return deferred.promise;
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Slice_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Slice_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['controller'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: controller'));
- return deferred.promise;
- }
-
- if (parameters['slice_privilege'] !== undefined) {
- form['slice_privilege'] = parameters['slice_privilege'];
- }
-
- if (parameters['slice_privilege'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice_privilege'));
- return deferred.promise;
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} controller -
- * @param {string} slice_privilege -
- * @param {string} role_id - Keystone id
- *
- */
- xos.prototype.Controller_Slice_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['slice_privilege'] !== undefined) {
- form['slice_privilege'] = parameters['slice_privilege'];
- }
-
- if (parameters['role_id'] !== undefined) {
- form['role_id'] = parameters['role_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Controller_Slice_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Controller_Slice_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/controllersliceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_List_GET
- *
- */
- xos.prototype.Site_Deployment_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} deployment -
- * @param {string} controller -
- * @param {string} availability_zone - OpenStack availability zone
- *
- */
- xos.prototype.Site_Deployment_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['availability_zone'] !== undefined) {
- form['availability_zone'] = parameters['availability_zone'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Deployment_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} deployment -
- * @param {string} controller -
- * @param {string} availability_zone - OpenStack availability zone
- *
- */
- xos.prototype.Site_Deployment_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['deployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: deployment'));
- return deferred.promise;
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['availability_zone'] !== undefined) {
- form['availability_zone'] = parameters['availability_zone'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} site -
- * @param {string} deployment -
- * @param {string} controller -
- * @param {string} availability_zone - OpenStack availability zone
- *
- */
- xos.prototype.Site_Deployment_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['deployment'] !== undefined) {
- form['deployment'] = parameters['deployment'];
- }
-
- if (parameters['controller'] !== undefined) {
- form['controller'] = parameters['controller'];
- }
-
- if (parameters['availability_zone'] !== undefined) {
- form['availability_zone'] = parameters['availability_zone'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Site_Deployment_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Site_Deployment_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/sitedeployments/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_List_GET
- *
- */
- xos.prototype.Tenant_With_Container_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_With_Container_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_With_Container_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_With_Container_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Tenant_With_Container_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_With_Container_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_With_Container_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantwithcontainers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_List_GET
- *
- */
- xos.prototype.Deployment_Role_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Deployment_Role_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Role_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Deployment_Role_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
-
- *
- */
- xos.prototype.Deployment_Role_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- form['role'] = 'admin';
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Deployment_Role_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Deployment_Role_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/deploymentroles/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_List_GET
- *
- */
- xos.prototype.User_Credential_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.User_Credential_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.User_Credential_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.User_Credential_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['key_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: key_id'));
- return deferred.promise;
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters['enc_value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: enc_value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user - The User this credential is associated with
- * @param {string} name - The credential type, e.g. ec2
- * @param {string} key_id - The backend id of this credential
- * @param {string} enc_value - The key value of this credential
- *
- */
- xos.prototype.User_Credential_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['key_id'] !== undefined) {
- form['key_id'] = parameters['key_id'];
- }
-
- if (parameters['enc_value'] !== undefined) {
- form['enc_value'] = parameters['enc_value'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#User_Credential_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.User_Credential_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/usercredentials/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_List_GET
- *
- */
- xos.prototype.Tenant_Root_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} tenant_root -
- * @param {string} role -
- *
- */
- xos.prototype.Tenant_Root_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['tenant_root'] !== undefined) {
- form['tenant_root'] = parameters['tenant_root'];
- }
-
- if (parameters['tenant_root'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: tenant_root'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} tenant_root -
- * @param {string} role -
- *
- */
- xos.prototype.Tenant_Root_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['tenant_root'] !== undefined) {
- form['tenant_root'] = parameters['tenant_root'];
- }
-
- if (parameters['tenant_root'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: tenant_root'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} tenant_root -
- * @param {string} role -
- *
- */
- xos.prototype.Tenant_Root_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['tenant_root'] !== undefined) {
- form['tenant_root'] = parameters['tenant_root'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Tenant_Root_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Tenant_Root_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/tenantrootprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_List_GET
- *
- */
- xos.prototype.Slice_Tag_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice -
- * @param {choice} name - The name of this tag
- * @param {string} value - The value of this tag
- *
- */
- xos.prototype.Slice_Tag_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Tag_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice -
- * @param {choice} name - The name of this tag
- * @param {string} value - The value of this tag
- *
- */
- xos.prototype.Slice_Tag_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['slice'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: slice'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters['value'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: value'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} slice -
- * @param {choice} name - The name of this tag
- * @param {string} value - The value of this tag
- *
- */
- xos.prototype.Slice_Tag_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['slice'] !== undefined) {
- form['slice'] = parameters['slice'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['value'] !== undefined) {
- form['value'] = parameters['value'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Slice_Tag_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Slice_Tag_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/slicetags/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_List_GET
- *
- */
- xos.prototype.Coarse_Tenant_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Coarse_Tenant_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Coarse_Tenant_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Coarse_Tenant_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['kind'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: kind'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters['connect_method'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: connect_method'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} kind -
- * @param {string} provider_service -
- * @param {string} subscriber_service -
- * @param {string} subscriber_tenant -
- * @param {string} subscriber_user -
- * @param {string} subscriber_root -
- * @param {string} service_specific_id -
- * @param {string} service_specific_attribute -
- * @param {choice} connect_method -
- *
- */
- xos.prototype.Coarse_Tenant_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['kind'] !== undefined) {
- form['kind'] = parameters['kind'];
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['subscriber_service'] !== undefined) {
- form['subscriber_service'] = parameters['subscriber_service'];
- }
-
- if (parameters['subscriber_tenant'] !== undefined) {
- form['subscriber_tenant'] = parameters['subscriber_tenant'];
- }
-
- if (parameters['subscriber_user'] !== undefined) {
- form['subscriber_user'] = parameters['subscriber_user'];
- }
-
- if (parameters['subscriber_root'] !== undefined) {
- form['subscriber_root'] = parameters['subscriber_root'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_attribute'] !== undefined) {
- form['service_specific_attribute'] = parameters['service_specific_attribute'];
- }
-
- if (parameters['connect_method'] !== undefined) {
- form['connect_method'] = parameters['connect_method'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Coarse_Tenant_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Coarse_Tenant_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/coarsetenants/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_List_GET
- *
- */
- xos.prototype.Router_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} owner -
- *
- */
- xos.prototype.Router_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['owner'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: owner'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Router_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} owner -
- *
- */
- xos.prototype.Router_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters['owner'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: owner'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} name -
- * @param {string} owner -
- *
- */
- xos.prototype.Router_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['owner'] !== undefined) {
- form['owner'] = parameters['owner'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Router_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Router_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/routers/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_List_GET
- *
- */
- xos.prototype.Service_Resource_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} serviceClass -
- * @param {string} name -
- * @param {integer} maxUnitsDeployment -
- * @param {integer} maxUnitsNode -
- * @param {integer} maxDuration -
- * @param {integer} bucketInRate -
- * @param {integer} bucketMaxSize -
- * @param {integer} cost -
- * @param {boolean} calendarReservable -
- *
- */
- xos.prototype.Service_Resource_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['serviceClass'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: serviceClass'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['maxUnitsDeployment'] !== undefined) {
- form['maxUnitsDeployment'] = parameters['maxUnitsDeployment'];
- }
-
- if (parameters['maxUnitsDeployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxUnitsDeployment'));
- return deferred.promise;
- }
-
- if (parameters['maxUnitsNode'] !== undefined) {
- form['maxUnitsNode'] = parameters['maxUnitsNode'];
- }
-
- if (parameters['maxUnitsNode'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxUnitsNode'));
- return deferred.promise;
- }
-
- if (parameters['maxDuration'] !== undefined) {
- form['maxDuration'] = parameters['maxDuration'];
- }
-
- if (parameters['maxDuration'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxDuration'));
- return deferred.promise;
- }
-
- if (parameters['bucketInRate'] !== undefined) {
- form['bucketInRate'] = parameters['bucketInRate'];
- }
-
- if (parameters['bucketInRate'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: bucketInRate'));
- return deferred.promise;
- }
-
- if (parameters['bucketMaxSize'] !== undefined) {
- form['bucketMaxSize'] = parameters['bucketMaxSize'];
- }
-
- if (parameters['bucketMaxSize'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: bucketMaxSize'));
- return deferred.promise;
- }
-
- if (parameters['cost'] !== undefined) {
- form['cost'] = parameters['cost'];
- }
-
- if (parameters['cost'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cost'));
- return deferred.promise;
- }
-
- if (parameters['calendarReservable'] !== undefined) {
- form['calendarReservable'] = parameters['calendarReservable'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Resource_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} serviceClass -
- * @param {string} name -
- * @param {integer} maxUnitsDeployment -
- * @param {integer} maxUnitsNode -
- * @param {integer} maxDuration -
- * @param {integer} bucketInRate -
- * @param {integer} bucketMaxSize -
- * @param {integer} cost -
- * @param {boolean} calendarReservable -
- *
- */
- xos.prototype.Service_Resource_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['serviceClass'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: serviceClass'));
- return deferred.promise;
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['maxUnitsDeployment'] !== undefined) {
- form['maxUnitsDeployment'] = parameters['maxUnitsDeployment'];
- }
-
- if (parameters['maxUnitsDeployment'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxUnitsDeployment'));
- return deferred.promise;
- }
-
- if (parameters['maxUnitsNode'] !== undefined) {
- form['maxUnitsNode'] = parameters['maxUnitsNode'];
- }
-
- if (parameters['maxUnitsNode'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxUnitsNode'));
- return deferred.promise;
- }
-
- if (parameters['maxDuration'] !== undefined) {
- form['maxDuration'] = parameters['maxDuration'];
- }
-
- if (parameters['maxDuration'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: maxDuration'));
- return deferred.promise;
- }
-
- if (parameters['bucketInRate'] !== undefined) {
- form['bucketInRate'] = parameters['bucketInRate'];
- }
-
- if (parameters['bucketInRate'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: bucketInRate'));
- return deferred.promise;
- }
-
- if (parameters['bucketMaxSize'] !== undefined) {
- form['bucketMaxSize'] = parameters['bucketMaxSize'];
- }
-
- if (parameters['bucketMaxSize'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: bucketMaxSize'));
- return deferred.promise;
- }
-
- if (parameters['cost'] !== undefined) {
- form['cost'] = parameters['cost'];
- }
-
- if (parameters['cost'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cost'));
- return deferred.promise;
- }
-
- if (parameters['calendarReservable'] !== undefined) {
- form['calendarReservable'] = parameters['calendarReservable'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} serviceClass -
- * @param {string} name -
- * @param {integer} maxUnitsDeployment -
- * @param {integer} maxUnitsNode -
- * @param {integer} maxDuration -
- * @param {integer} bucketInRate -
- * @param {integer} bucketMaxSize -
- * @param {integer} cost -
- * @param {boolean} calendarReservable -
- *
- */
- xos.prototype.Service_Resource_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['maxUnitsDeployment'] !== undefined) {
- form['maxUnitsDeployment'] = parameters['maxUnitsDeployment'];
- }
-
- if (parameters['maxUnitsNode'] !== undefined) {
- form['maxUnitsNode'] = parameters['maxUnitsNode'];
- }
-
- if (parameters['maxDuration'] !== undefined) {
- form['maxDuration'] = parameters['maxDuration'];
- }
-
- if (parameters['bucketInRate'] !== undefined) {
- form['bucketInRate'] = parameters['bucketInRate'];
- }
-
- if (parameters['bucketMaxSize'] !== undefined) {
- form['bucketMaxSize'] = parameters['bucketMaxSize'];
- }
-
- if (parameters['cost'] !== undefined) {
- form['cost'] = parameters['cost'];
- }
-
- if (parameters['calendarReservable'] !== undefined) {
- form['calendarReservable'] = parameters['calendarReservable'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Resource_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Resource_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceresources/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_List_GET
- *
- */
- xos.prototype.Service_Privilege_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_List_POST
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} service -
- * @param {string} role -
- *
- */
- xos.prototype.Service_Privilege_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_Detail_GET
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Privilege_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} service -
- * @param {string} role -
- *
- */
- xos.prototype.Service_Privilege_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['backend_status'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: backend_status'));
- return deferred.promise;
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['user'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: user'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters['role'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: role'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} policed -
- * @param {string} backend_register -
- * @param {string} backend_status -
- * @param {boolean} deleted -
- * @param {boolean} write_protect -
- * @param {boolean} lazy_blocked -
- * @param {boolean} no_sync -
- * @param {string} user -
- * @param {string} service -
- * @param {string} role -
- *
- */
- xos.prototype.Service_Privilege_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['policed'] !== undefined) {
- form['policed'] = parameters['policed'];
- }
-
- if (parameters['backend_register'] !== undefined) {
- form['backend_register'] = parameters['backend_register'];
- }
-
- if (parameters['backend_status'] !== undefined) {
- form['backend_status'] = parameters['backend_status'];
- }
-
- if (parameters['deleted'] !== undefined) {
- form['deleted'] = parameters['deleted'];
- }
-
- if (parameters['write_protect'] !== undefined) {
- form['write_protect'] = parameters['write_protect'];
- }
-
- if (parameters['lazy_blocked'] !== undefined) {
- form['lazy_blocked'] = parameters['lazy_blocked'];
- }
-
- if (parameters['no_sync'] !== undefined) {
- form['no_sync'] = parameters['no_sync'];
- }
-
- if (parameters['user'] !== undefined) {
- form['user'] = parameters['user'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['role'] !== undefined) {
- form['role'] = parameters['role'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xos#Service_Privilege_Detail_DELETE
- * @param {string} pk -
- *
- */
- xos.prototype.Service_Privilege_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xos/serviceprivileges/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xos.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
-
- return xos;
- })();
-
- return xos;
- }]);/*jshint -W069 */
-/*global angular:false */
-angular.module('xos.xoslib', [])
- .factory('xoslib', ['$q', '$http', '$rootScope', function($q, $http, $rootScope) {
- 'use strict';
-
- /**
- *
- * @class xoslib
- * @param {(string|object)} [domainOrOptions] - The project domain or options object. If object, see the object's optional properties.
- * @param {string} [domainOrOptions.domain] - The project domain
- * @param {string} [domainOrOptions.cache] - An angularjs cache implementation
- * @param {object} [domainOrOptions.token] - auth token - object with value property and optional headerOrQueryName and isQuery properties
- * @param {string} [cache] - An angularjs cache implementation
- */
- var xoslib = (function() {
- function xoslib(options, cache) {
- var domain = (typeof options === 'object') ? options.domain : options;
- this.domain = typeof(domain) === 'string' ? domain : 'http://localhost:9999';
- cache = cache || ((typeof options === 'object') ? options.cache : cache);
- this.cache = cache;
- }
-
- xoslib.prototype.$on = function($scope, path, handler) {
- var url = domain + path;
- $scope.$on(url, function() {
- handler();
- });
- return this;
- };
-
- xoslib.prototype.$broadcast = function(path) {
- var url = domain + path;
- //cache.remove(url);
- $rootScope.$broadcast(url);
- return this;
- };
-
- xoslib.transformRequest = function(obj) {
- var str = [];
- for (var p in obj) {
- var val = obj[p];
- if (angular.isArray(val)) {
- val.forEach(function(val) {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- });
- } else {
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(val));
- }
- }
- return str.join("&");
- };
-
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Monitoring_Channel_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_Detail_PUT
- * @param {string} pk -
- * @param {string} provider_service -
- *
- */
- xoslib.prototype.Monitoring_Channel_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_Detail_PATCH
- * @param {string} pk -
- * @param {string} provider_service -
- *
- */
- xoslib.prototype.Monitoring_Channel_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_Detail_DELETE
- * @param {string} pk -
- *
- */
- xoslib.prototype.Monitoring_Channel_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_List_GET
- *
- */
- xoslib.prototype.Monitoring_Channel_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Monitoring_Channel_List_POST
- * @param {string} provider_service -
- *
- */
- xoslib.prototype.Monitoring_Channel_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/monitoringchannel/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Hpc_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Hpc_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/hpcview/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Hpc_List_GET
- *
- */
- xoslib.prototype.Hpc_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/hpcview/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Tenant_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Tenant_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/tenantview/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Tenant_List_GET
- *
- */
- xoslib.prototype.Tenant_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/tenantview/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Port_Forwarding_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Port_Forwarding_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/portforwarding/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Port_Forwarding_List_GET
- *
- */
- xoslib.prototype.Port_Forwarding_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/portforwarding/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Ssh_Key_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Ssh_Key_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/sshkeys/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Ssh_Key_List_GET
- *
- */
- xoslib.prototype.Ssh_Key_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/sshkeys/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Debug_get_vbng_dump
- *
- */
- xoslib.prototype.Cord_Debug_get_vbng_dump = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/cord_debug/vbng_dump/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_Detail_PUT
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_Detail_PATCH
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_Detail_DELETE
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_List_GET
- *
- */
- xoslib.prototype.Cord_Subscriber_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_List_POST
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/cordsubscriber/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_list
- *
- */
- xoslib.prototype.Cord_Subscriber_list = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_update
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_update = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_partial_update
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_partial_update = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_update
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_update = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_destroy
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_destroy = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_retrieve
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_retrieve = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_vcpe_synced
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_vcpe_synced = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/vcpe_synced/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_url_filter
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_url_filter = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/url_filter/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_set_url_filter
- * @param {string} pk -
- * @param {string} level -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_set_url_filter = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/url_filter/{level}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{level}', parameters['level']);
-
- if (parameters['level'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: level'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_services
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_services = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/services/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_service
- * @param {string} pk -
- * @param {string} service -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_service = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/services/{service}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{service}', parameters['service']);
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: service'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_enable_service
- * @param {string} pk -
- * @param {string} service -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_enable_service = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/services/{service}/true/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{service}', parameters['service']);
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_disable_service
- * @param {string} pk -
- * @param {string} service -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_disable_service = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/services/{service}/false/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{service}', parameters['service']);
-
- if (parameters['service'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: service'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_create_user
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_create_user = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_users
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_users = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_clear_users
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_clear_users = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/clearusers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_clear_users
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_clear_users = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/clearusers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_clear_users
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_clear_users = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/clearusers/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_create_user
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_create_user = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/newuser/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_create_user
- * @param {string} pk -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_create_user = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/newuser/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_delete_user
- * @param {string} pk -
- * @param {string} uid -
- *
- */
- xoslib.prototype.Cord_Subscriber_delete_user = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/{uid}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{uid}', parameters['uid']);
-
- if (parameters['uid'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: uid'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_user_level
- * @param {string} pk -
- * @param {string} uid -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_user_level = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/{uid}/url_filter/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{uid}', parameters['uid']);
-
- if (parameters['uid'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: uid'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_set_user_level
- * @param {string} pk -
- * @param {string} uid -
- * @param {string} level -
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_set_user_level = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/users/{uid}/url_filter/{level}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- path = path.replace('{uid}', parameters['uid']);
-
- if (parameters['uid'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: uid'));
- return deferred.promise;
- }
-
- path = path.replace('{level}', parameters['level']);
-
- if (parameters['level'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: level'));
- return deferred.promise;
- }
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_bbsdump
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_Subscriber_get_bbsdump = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subscriber/{pk}/bbsdump/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_initdemo
- * @param {boolean} firewall_enable -
- * @param {string} firewall_rules -
- * @param {boolean} url_filter_enable -
- * @param {string} url_filter_rules -
- * @param {string} url_filter_level -
- * @param {boolean} vcpe_synced -
- * @param {boolean} cdn_enable -
- * @param {string} routeable_subnet -
- *
- */
- xoslib.prototype.Cord_Subscriber_initdemo = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/initdemo/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['firewall_enable'] !== undefined) {
- form['firewall_enable'] = parameters['firewall_enable'];
- }
-
- if (parameters['firewall_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_enable'));
- return deferred.promise;
- }
-
- if (parameters['firewall_rules'] !== undefined) {
- form['firewall_rules'] = parameters['firewall_rules'];
- }
-
- if (parameters['firewall_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: firewall_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_enable'] !== undefined) {
- form['url_filter_enable'] = parameters['url_filter_enable'];
- }
-
- if (parameters['url_filter_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_enable'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_rules'] !== undefined) {
- form['url_filter_rules'] = parameters['url_filter_rules'];
- }
-
- if (parameters['url_filter_rules'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: url_filter_rules'));
- return deferred.promise;
- }
-
- if (parameters['url_filter_level'] !== undefined) {
- form['url_filter_level'] = parameters['url_filter_level'];
- }
-
- if (parameters['vcpe_synced'] !== undefined) {
- form['vcpe_synced'] = parameters['vcpe_synced'];
- }
-
- if (parameters['vcpe_synced'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vcpe_synced'));
- return deferred.promise;
- }
-
- if (parameters['cdn_enable'] !== undefined) {
- form['cdn_enable'] = parameters['cdn_enable'];
- }
-
- if (parameters['cdn_enable'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: cdn_enable'));
- return deferred.promise;
- }
-
- if (parameters['routeable_subnet'] !== undefined) {
- form['routeable_subnet'] = parameters['routeable_subnet'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_initdemo
- *
- */
- xoslib.prototype.Cord_Subscriber_initdemo = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/initdemo/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_ssiddetail
- * @param {string} ssid -
- *
- */
- xoslib.prototype.Cord_Subscriber_ssiddetail = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subidlookup/{ssid}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{ssid}', parameters['ssid']);
-
- if (parameters['ssid'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: ssid'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_ssidlist
- *
- */
- xoslib.prototype.Cord_Subscriber_ssidlist = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/subidlookup/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_Subscriber_get_vbng_mapping
- *
- */
- xoslib.prototype.Cord_Subscriber_get_vbng_mapping = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/rs/vbng_mapping/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_User_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_User_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/corduser/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_User_Detail_PUT
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_User_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/corduser/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_User_Detail_DELETE
- * @param {string} pk -
- *
- */
- xoslib.prototype.Cord_User_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/corduser/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_User_List_GET
- *
- */
- xoslib.prototype.Cord_User_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/corduser/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Cord_User_List_POST
- *
- */
- xoslib.prototype.Cord_User_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/corduser/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Volt_Tenant_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_Detail_PUT
- * @param {string} pk -
- * @param {string} provider_service -
- * @param {string} service_specific_id -
- * @param {string} vlan_id -
- *
- */
- xoslib.prototype.Volt_Tenant_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service_specific_id'));
- return deferred.promise;
- }
-
- if (parameters['vlan_id'] !== undefined) {
- form['vlan_id'] = parameters['vlan_id'];
- }
-
- if (parameters['vlan_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vlan_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_Detail_PATCH
- * @param {string} pk -
- * @param {string} provider_service -
- * @param {string} service_specific_id -
- * @param {string} vlan_id -
- *
- */
- xoslib.prototype.Volt_Tenant_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['vlan_id'] !== undefined) {
- form['vlan_id'] = parameters['vlan_id'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_Detail_DELETE
- * @param {string} pk -
- *
- */
- xoslib.prototype.Volt_Tenant_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_List_GET
- *
- */
- xoslib.prototype.Volt_Tenant_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Volt_Tenant_List_POST
- * @param {string} provider_service -
- * @param {string} service_specific_id -
- * @param {string} vlan_id -
- *
- */
- xoslib.prototype.Volt_Tenant_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/volttenant/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['provider_service'] !== undefined) {
- form['provider_service'] = parameters['provider_service'];
- }
-
- if (parameters['provider_service'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: provider_service'));
- return deferred.promise;
- }
-
- if (parameters['service_specific_id'] !== undefined) {
- form['service_specific_id'] = parameters['service_specific_id'];
- }
-
- if (parameters['service_specific_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: service_specific_id'));
- return deferred.promise;
- }
-
- if (parameters['vlan_id'] !== undefined) {
- form['vlan_id'] = parameters['vlan_id'];
- }
-
- if (parameters['vlan_id'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: vlan_id'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_Detail_GET
- * @param {string} pk -
- *
- */
- xoslib.prototype.Slice_Plus_Detail_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_Detail_PUT
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} mount_data_sets -
- * @param {string} default_image -
- * @param {string} default_flavor -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} network_ports -
- * @param {string} site_allocation -
- * @param {string} site_ready -
- * @param {string} users -
- * @param {string} user_names -
- *
- */
- xoslib.prototype.Slice_Plus_Detail_PUT = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['max_instances'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: max_instances'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['network_ports'] !== undefined) {
- form['network_ports'] = parameters['network_ports'];
- }
-
- if (parameters['site_allocation'] !== undefined) {
- form['site_allocation'] = parameters['site_allocation'];
- }
-
- if (parameters['site_ready'] !== undefined) {
- form['site_ready'] = parameters['site_ready'];
- }
-
- if (parameters['users'] !== undefined) {
- form['users'] = parameters['users'];
- }
-
- if (parameters['user_names'] !== undefined) {
- form['user_names'] = parameters['user_names'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PUT',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_Detail_PATCH
- * @param {string} pk -
- * @param {string} enacted -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} mount_data_sets -
- * @param {string} default_image -
- * @param {string} default_flavor -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} network_ports -
- * @param {string} site_allocation -
- * @param {string} site_ready -
- * @param {string} users -
- * @param {string} user_names -
- *
- */
- xoslib.prototype.Slice_Plus_Detail_PATCH = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['network_ports'] !== undefined) {
- form['network_ports'] = parameters['network_ports'];
- }
-
- if (parameters['site_allocation'] !== undefined) {
- form['site_allocation'] = parameters['site_allocation'];
- }
-
- if (parameters['site_ready'] !== undefined) {
- form['site_ready'] = parameters['site_ready'];
- }
-
- if (parameters['users'] !== undefined) {
- form['users'] = parameters['users'];
- }
-
- if (parameters['user_names'] !== undefined) {
- form['user_names'] = parameters['user_names'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'PATCH',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_Detail_DELETE
- * @param {string} pk -
- *
- */
- xoslib.prototype.Slice_Plus_Detail_DELETE = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/{pk}/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- path = path.replace('{pk}', parameters['pk']);
-
- if (parameters['pk'] === undefined) {
- deferred.reject(new Error('Missing required path parameter: pk'));
- return deferred.promise;
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'DELETE',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_List_GET
- *
- */
- xoslib.prototype.Slice_Plus_List_GET = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var cached = parameters.$cache && parameters.$cache.get(url);
- if (cached !== undefined && parameters.$refresh !== true) {
- deferred.resolve(cached);
- return deferred.promise;
- }
- var options = {
- timeout: parameters.$timeout,
- method: 'GET',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
- /**
- *
- * @method
- * @name xoslib#Slice_Plus_List_POST
- * @param {string} enacted -
- * @param {string} name - The Name of the Slice
- * @param {boolean} enabled - Status for this Slice
- * @param {boolean} omf_friendly -
- * @param {string} description - High level description of the slice and expected activities
- * @param {string} slice_url -
- * @param {string} site - The Site this Slice belongs to
- * @param {integer} max_instances -
- * @param {string} service -
- * @param {string} network -
- * @param {string} mount_data_sets -
- * @param {string} default_image -
- * @param {string} default_flavor -
- * @param {string} serviceClass -
- * @param {string} creator -
- * @param {string} network_ports -
- * @param {string} site_allocation -
- * @param {string} site_ready -
- * @param {string} users -
- * @param {string} user_names -
- *
- */
- xoslib.prototype.Slice_Plus_List_POST = function(parameters) {
- if (parameters === undefined) {
- parameters = {};
- }
- var deferred = $q.defer();
-
- var domain = this.domain;
- var path = '/xoslib/slicesplus/';
-
- var body;
- var queryParameters = {};
- var headers = {};
- var form = {};
-
- if (parameters['enacted'] !== undefined) {
- form['enacted'] = parameters['enacted'];
- }
-
- if (parameters['name'] !== undefined) {
- form['name'] = parameters['name'];
- }
-
- if (parameters['name'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: name'));
- return deferred.promise;
- }
-
- if (parameters['enabled'] !== undefined) {
- form['enabled'] = parameters['enabled'];
- }
-
- if (parameters['omf_friendly'] !== undefined) {
- form['omf_friendly'] = parameters['omf_friendly'];
- }
-
- if (parameters['description'] !== undefined) {
- form['description'] = parameters['description'];
- }
-
- if (parameters['slice_url'] !== undefined) {
- form['slice_url'] = parameters['slice_url'];
- }
-
- if (parameters['site'] !== undefined) {
- form['site'] = parameters['site'];
- }
-
- if (parameters['site'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: site'));
- return deferred.promise;
- }
-
- if (parameters['max_instances'] !== undefined) {
- form['max_instances'] = parameters['max_instances'];
- }
-
- if (parameters['max_instances'] === undefined) {
- deferred.reject(new Error('Missing required form parameter: max_instances'));
- return deferred.promise;
- }
-
- if (parameters['service'] !== undefined) {
- form['service'] = parameters['service'];
- }
-
- if (parameters['network'] !== undefined) {
- form['network'] = parameters['network'];
- }
-
- if (parameters['mount_data_sets'] !== undefined) {
- form['mount_data_sets'] = parameters['mount_data_sets'];
- }
-
- if (parameters['default_image'] !== undefined) {
- form['default_image'] = parameters['default_image'];
- }
-
- if (parameters['default_flavor'] !== undefined) {
- form['default_flavor'] = parameters['default_flavor'];
- }
-
- if (parameters['serviceClass'] !== undefined) {
- form['serviceClass'] = parameters['serviceClass'];
- }
-
- if (parameters['creator'] !== undefined) {
- form['creator'] = parameters['creator'];
- }
-
- if (parameters['network_ports'] !== undefined) {
- form['network_ports'] = parameters['network_ports'];
- }
-
- if (parameters['site_allocation'] !== undefined) {
- form['site_allocation'] = parameters['site_allocation'];
- }
-
- if (parameters['site_ready'] !== undefined) {
- form['site_ready'] = parameters['site_ready'];
- }
-
- if (parameters['users'] !== undefined) {
- form['users'] = parameters['users'];
- }
-
- if (parameters['user_names'] !== undefined) {
- form['user_names'] = parameters['user_names'];
- }
-
- if (parameters.$queryParameters) {
- Object.keys(parameters.$queryParameters)
- .forEach(function(parameterName) {
- var parameter = parameters.$queryParameters[parameterName];
- queryParameters[parameterName] = parameter;
- });
- }
-
- var url = domain + path;
- var options = {
- timeout: parameters.$timeout,
- method: 'POST',
- url: url,
- params: queryParameters,
- data: body,
- headers: headers
- };
- if (Object.keys(form).length > 0) {
- options.data = form;
- options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
- options.transformRequest = xoslib.transformRequest;
- }
- $http(options)
- .success(function(data, status, headers, config) {
- deferred.resolve(data);
- if (parameters.$cache !== undefined) {
- parameters.$cache.put(url, data, parameters.$cacheItemOpts ? parameters.$cacheItemOpts : {});
- }
- })
- .error(function(data, status, headers, config) {
- deferred.reject({
- status: status,
- headers: headers,
- config: config,
- body: data
- });
- });
-
- return deferred.promise;
- };
-
- return xoslib;
- })();
-
- return xoslib;
- }]);
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosDiagnostic.js b/xos/core/xoslib/static/js/xosDiagnostic.js
index 4e4def0..6214de7 100644
--- a/xos/core/xoslib/static/js/xosDiagnostic.js
+++ b/xos/core/xoslib/static/js/xosDiagnostic.js
@@ -1,2018 +1,2 @@
-//Autogenerated, do not edit!!!
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic', ['ngResource', 'ngCookies', 'ngLodash', 'ngAnimate', 'ui.router', 'xos.helpers']).config(["$stateProvider", function ($stateProvider) {
- $stateProvider.state('home', {
- url: '/',
- template: '<diagnostic-container></diagnostic-container>'
- });
- }]).config(["$httpProvider", function ($httpProvider) {
- $httpProvider.interceptors.push('NoHyperlinks');
- }]).run(["$log", function ($log) {
- $log.info('Diagnostic Started');
- }]);
-})();
-angular.module("xos.diagnostic").run(["$templateCache", function($templateCache) {$templateCache.put("templates/diagnostic.tpl.html","<div class=\"container-fluid\">\n <div ng-hide=\"vm.error && vm.loader\" style=\"height: 900px\">\n <div class=\"onethird-height\">\n <div class=\"well\">\n Services Graph\n </div>\n <div class=\"well pull-right\" ng-click=\"vm.reloadGlobalScope()\" ng-show=\"vm.selectedSubscriber\">\n Reset subscriber\n </div>\n <service-topology service-chain=\"vm.serviceChain\"></service-topology>\n </div>\n <div class=\"twothird-height\">\n <div class=\"well\">\n Logical Resources\n </div>\n <logic-topology ng-if=\"vm.subscribers\" subscribers=\"vm.subscribers\" selected=\"vm.selectedSubscriber\"></logic-topology>\n </div>\n </div>\n <div class=\"row\" ng-if=\"vm.error\">\n <div class=\"col-xs-12\">\n <div class=\"alert alert-danger\">\n {{vm.error}}\n </div>\n </div>\n </div>\n <div class=\"row\" ng-if=\"vm.loader\">\n <div class=\"col-xs-12\">\n <div class=\"loader\">Loading</div>\n </div>\n </div>\n</div>");
-$templateCache.put("templates/logicTopology.tpl.html","<select-subscriber-modal open=\"vm.openSelectSubscriberModal\" subscribers=\"vm.subscribers\"></select-subscriber-modal>\n<subscriber-status-modal open=\"vm.openSubscriberStatusModal\" subscriber=\"vm.currentSubscriber\"></subscriber-status-modal>\n<div class=\"alert alert-danger animate\" ng-hide=\"!vm.error\">\n {{vm.error}}\n</div>\n<!-- <div class=\"instances-stats animate\" ng-hide=\"vm.hideInstanceStats\">\n <div class=\"row\">\n <div class=\"col-sm-3 col-sm-offset-8\">\n <div class=\"panel panel-primary\" ng-repeat=\"instance in vm.selectedInstances\">\n <div class=\"panel-heading\">\n {{instance.humanReadableName}}\n </div>\n <ul class=\"list-group\">\n <li class=\"list-group-item\">Backend Status: {{instance.backend_status}}</li>\n <li class=\"list-group-item\">IP Address: {{instance.ip}}</li>\n </ul>\n <ul class=\"list-group\">\n <li class=\"list-group-item\" ng-repeat=\"stat in instance.stats\">\n <span class=\"badge\">{{stat.value}}</span>\n {{stat.meter}}\n </li>\n </ul>\n </div>\n </div> \n </div>\n </div>\n</div> -->");
-$templateCache.put("templates/select-subscriber-modal.tpl.html","<div class=\"modal fade\" ng-class=\"{in: vm.open}\" tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog modal-sm\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button ng-click=\"vm.close()\" type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n <h4 class=\"modal-title\">Select a subscriber:</h4>\n </div>\n <div class=\"modal-body\">\n <select class=\"form-control\" ng-options=\"s as s.humanReadableName for s in vm.subscribers\" ng-model=\"vm.selected\"></select>\n </div>\n <div class=\"modal-footer\">\n <button ng-click=\"vm.close()\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n <button ng-click=\"vm.select(vm.selected)\" type=\"button\" class=\"btn btn-primary\">Select</button>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->");
-$templateCache.put("templates/subscriber-status-modal.tpl.html","<div class=\"modal fade\" ng-class=\"{in: vm.open}\" tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog modal-sm\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button ng-click=\"vm.close()\" type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n <h4 class=\"modal-title\">Manage subscriber:</h4>\n </div>\n <form name=\"vm.subscriber-detail\">\n <div class=\"modal-body\">\n <div class=\"row\">\n <div class=\"col-xs-12\">\n <label>Status</label>\n </div>\n <div class=\"col-xs-6\">\n <a ng-click=\"vm.subscriber.status = \'enabled\'\"\n class=\"btn btn-block\"\n ng-class=\"{\'btn-primary\': vm.subscriber.status === \'enabled\' ,\'btn-default\': vm.subscriber.status !== \'enabled\'}\"\n >Enabled</a>\n </div>\n <div class=\"col-xs-6\">\n <a ng-click=\"vm.subscriber.status = \'suspended\'\"\n class=\"btn btn-block\"\n ng-class=\"{\'btn-primary\': vm.subscriber.status === \'suspended\' ,\'btn-default\': vm.subscriber.status !== \'suspended\'}\"\n >Suspended</a>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6\">\n <a ng-click=\"vm.subscriber.status = \'delinquent\'\"\n class=\"btn btn-block\"\n ng-class=\"{\'btn-primary\': vm.subscriber.status === \'delinquent\' ,\'btn-default\': vm.subscriber.status !== \'delinquent\'}\"\n >Delinquent <br> payment</a>\n </div>\n <div class=\"col-xs-6\">\n <a ng-click=\"vm.subscriber.status = \'copyrightviolation\'\"\n class=\"btn btn-block\"\n ng-class=\"{\'btn-primary\': vm.subscriber.status === \'copyrightviolation\' ,\'btn-default\': vm.subscriber.status !== \'copyrightviolation\'}\"\n >Copyright <br> violation</a>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6\">\n <label>Uplink Speed</label>\n <div class=\"input-group\">\n <input type=\"number\" class=\"form-control small-padding\" ng-model=\"vm.subscriber.uplink_speed\"/>\n <span class=\"input-group-addon\">Mbps</span>\n </div>\n </div>\n <div class=\"col-xs-6\">\n <label>Downlink Speed</label>\n <div class=\"input-group\">\n <input type=\"number\" class=\"form-control small-padding\" ng-model=\"vm.subscriber.downlink_speed\"/>\n <span class=\"input-group-addon\">Mbps</span>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6\">\n <label>Enable Internet</label>\n </div>\n <div class=\"col-xs-6\">\n <a \n ng-click=\"vm.subscriber.enable_uverse = !vm.subscriber.enable_uverse\" \n ng-class=\"{\'btn-success\': vm.subscriber.enable_uverse, \'btn-danger\': !vm.subscriber.enable_uverse}\"\n class=\"btn btn-block\">\n <span ng-show=\"vm.subscriber.enable_uverse === true\">Enabled</span>\n <span ng-show=\"vm.subscriber.enable_uverse !== true\">Disabled</span>\n </a>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\" ng-show=\"vm.success || vm.formError\">\n <div class=\"alert alert-success\" ng-show=\"vm.success\">\n {{vm.success}}\n </div>\n <div class=\"alert alert-danger\" ng-show=\"vm.formError\">\n {{vm.formError}}\n </div>\n </div>\n <div class=\"modal-footer\">\n <button ng-click=\"vm.close()\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n <button ng-click=\"vm.updateSubscriber(vm.subscriber)\" type=\"button\" class=\"btn btn-primary\">Save</button>\n </div>\n </form>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->");}]);
-'use strict';
-
-(function () {
- 'use strict';
- angular.module('xos.diagnostic').directive('selectSubscriberModal', function () {
- return {
- scope: {
- subscribers: '=',
- open: '='
- },
- bindToController: true,
- restrict: 'E',
- templateUrl: 'templates/select-subscriber-modal.tpl.html',
- controllerAs: 'vm',
- controller: ["$rootScope", function controller($rootScope) {
- var _this = this;
-
- this.close = function () {
- _this.open = false;
- };
-
- this.select = function (subscriber) {
- $rootScope.$emit('subscriber.selected', subscriber);
- _this.close();
- };
- }]
- };
- }).directive('subscriberStatusModal', function () {
- return {
- scope: {
- open: '=',
- subscriber: '='
- },
- bindToController: true,
- restrict: 'E',
- templateUrl: 'templates/subscriber-status-modal.tpl.html',
- controllerAs: 'vm',
- controller: ["$log", "$timeout", "$scope", "Subscribers", function controller($log, $timeout, $scope, Subscribers) {
- var _this2 = this;
-
- var mb = 1000000;
-
- $scope.$watch(function () {
- return _this2.open;
- }, function () {
- _this2.success = null;
- _this2.formError = null;
- });
-
- $scope.$watch(function () {
- return _this2.subscriber;
- }, function (newVal, oldVal) {
- if (!_this2.subscriber) {
- return;
- }
- console.log(newVal, oldVal);
- console.log('subscriber change', newVal === oldVal);
- _this2.subscriber.uplink_speed = parseInt(_this2.subscriber.uplink_speed, 10) / mb;
- _this2.subscriber.downlink_speed = parseInt(_this2.subscriber.downlink_speed, 10) / mb;
- });
-
- this.close = function () {
- _this2.open = false;
- };
-
- this.updateSubscriber = function (subscriber) {
-
- // TODO Copy the subscriber, this will update the GUI also and we don't want
- // TODO Change GBps to MBps
-
- var body = angular.copy(subscriber, body);
-
- body.uplink_speed = body.uplink_speed * mb;
- body.downlink_speed = body.downlink_speed * mb;
-
- Subscribers.update(body).$promise.then(function (res) {
- _this2.success = 'Subscriber successfully updated!';
- })['catch'](function (e) {
- _this2.formError = e;
- })['finally'](function () {
- $timeout(function () {
- _this2.close();
- }, 1500);
- });
- };
- }]
- };
- });
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').service('ServiceTopologyHelper', ["$rootScope", "$window", "$log", "lodash", "ServiceRelation", "serviceTopologyConfig", "d3", function ($rootScope, $window, $log, lodash, ServiceRelation, serviceTopologyConfig, d3) {
-
- var _svg, _layout, _source, _el;
-
- var i = 0;
-
- // given a canvas, a layout and a data source, draw a tree layout
- var updateTree = function updateTree(svg, layout, source) {
- var el = arguments.length <= 3 || arguments[3] === undefined ? _el : arguments[3];
-
- if (el) {
- _el = el;
- }
-
- var targetWidth = _el.clientWidth - serviceTopologyConfig.widthMargin * 2;
-
- //cache data
- _svg = svg;
- _layout = layout;
- _source = source;
-
- var maxDepth = ServiceRelation.depthOf(source);
-
- var diagonal = d3.svg.diagonal().projection(function (d) {
- return [d.y, d.x];
- });
-
- // Compute the new tree layout.
- var nodes = layout.nodes(source).reverse(),
- links = layout.links(nodes);
-
- // Normalize for fixed-depth.
- nodes.forEach(function (d) {
- // position the child node horizontally
- var step = (targetWidth - serviceTopologyConfig.widthMargin * 2) / (maxDepth - 1);
- d.y = d.depth * step;
- });
-
- // Update the nodes…
- var node = svg.selectAll('g.node').data(nodes, function (d) {
- return d.id || (d.id = ++i);
- });
-
- // Enter any new nodes at the parent's previous position.
- var nodeEnter = node.enter().append('g').attr({
- 'class': function _class(d) {
- return 'node ' + d.type;
- },
- transform: function transform(d) {
- return d.x && d.y ? 'translate(' + d.y + ', ' + d.x + ')' : 'translate(' + source.y0 + ', ' + source.x0 + ')';
- }
- });
-
- var subscriberNodes = nodeEnter.filter('.subscriber');
- var internetNodes = nodeEnter.filter('.router');
- var serviceNodes = nodeEnter.filter('.service');
-
- subscriberNodes.append('rect').attr(serviceTopologyConfig.square)
- // add event listener to subscriber
- .on('click', function () {
- $rootScope.$emit('subscriber.modal.open');
- });
-
- internetNodes.append('rect').attr(serviceTopologyConfig.square);
-
- serviceNodes.append('circle').attr('r', 1e-6).style('fill', function (d) {
- return d._children ? 'lightsteelblue' : '#fff';
- }).on('click', serviceClick);
-
- nodeEnter.append('text').attr({
- x: function x(d) {
- return d.children ? -serviceTopologyConfig.circle.selectedRadius - 5 : serviceTopologyConfig.circle.selectedRadius + 5;
- },
- dy: '.35em',
- y: function y(d) {
- if (d.children && d.parent) {
- return '-5';
- }
- },
- transform: function transform(d) {
- if (d.children && d.parent) {
- if (d.parent.x < d.x) {
- return 'rotate(-30)';
- }
- return 'rotate(30)';
- }
- },
- 'text-anchor': function textAnchor(d) {
- return d.children ? 'end' : 'start';
- }
- }).text(function (d) {
- return d.name;
- }).style('fill-opacity', 1e-6);
-
- // Transition nodes to their new position.
- var nodeUpdate = node.transition().duration(serviceTopologyConfig.duration).attr({
- 'transform': function transform(d) {
- return 'translate(' + d.y + ',' + d.x + ')';
- }
- });
-
- nodeUpdate.select('circle').attr('r', function (d) {
- return d.selected ? serviceTopologyConfig.circle.selectedRadius : serviceTopologyConfig.circle.radius;
- }).style('fill', function (d) {
- return d.selected ? 'lightsteelblue' : '#fff';
- });
-
- nodeUpdate.select('text').style('fill-opacity', 1);
-
- // Transition exiting nodes to the parent's new position.
- var nodeExit = node.exit().transition().duration(serviceTopologyConfig.duration).remove();
-
- nodeExit.select('circle').attr('r', 1e-6);
-
- nodeExit.select('text').style('fill-opacity', 1e-6);
-
- // Update the links…
- var link = svg.selectAll('path.link').data(links, function (d) {
- return d.target.id;
- });
-
- // Enter any new links at the parent's previous position.
- link.enter().insert('path', 'g').attr('class', function (d) {
- return 'link ' + d.target.type + ' ' + (d.target.active ? '' : 'active');
- }).attr('d', function (d) {
- var o = { x: source.x0, y: source.y0 };
- return diagonal({ source: o, target: o });
- });
-
- // Transition links to their new position.
- link.transition().duration(serviceTopologyConfig.duration).attr('d', diagonal);
-
- // Transition exiting nodes to the parent's new position.
- link.exit().transition().duration(serviceTopologyConfig.duration).attr('d', function (d) {
- var o = { x: source.x, y: source.y };
- return diagonal({ source: o, target: o });
- }).remove();
-
- // Stash the old positions for transition.
- nodes.forEach(function (d) {
- d.x0 = d.x;
- d.y0 = d.y;
- });
- };
-
- var serviceClick = function serviceClick(d) {
-
- // if was selected
- if (d.selected) {
- d.selected = !d.selected;
- $rootScope.$emit('instance.detail.hide', {});
- return updateTree(_svg, _layout, _source);
- }
-
- $rootScope.$emit('instance.detail', { name: d.name, service: d.service, tenant: d.tenant });
-
- // unselect all
- _svg.selectAll('circle').each(function (d) {
- return d.selected = false;
- });
-
- // toggling selected status
- d.selected = !d.selected;
-
- updateTree(_svg, _layout, _source);
- };
-
- this.updateTree = updateTree;
- }]);
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').directive('serviceTopology', function () {
- return {
- restrict: 'E',
- scope: {
- serviceChain: '='
- },
- bindToController: true,
- controllerAs: 'vm',
- template: '',
- controller: ["$element", "$window", "$scope", "d3", "serviceTopologyConfig", "ServiceRelation", "Slice", "Instances", "Subscribers", "ServiceTopologyHelper", function controller($element, $window, $scope, d3, serviceTopologyConfig, ServiceRelation, Slice, Instances, Subscribers, ServiceTopologyHelper) {
- var _this = this;
-
- var el = $element[0];
-
- d3.select(window).on('resize.service', function () {
- draw(_this.serviceChain);
- });
-
- var root, svg;
-
- var draw = function draw(tree) {
-
- if (!tree) {
- console.error('Tree is missing');
- return;
- }
-
- // TODO update instead clear and redraw
-
- // clean
- d3.select($element[0]).select('svg').remove();
-
- var width = el.clientWidth - serviceTopologyConfig.widthMargin * 2;
- var height = el.clientHeight - serviceTopologyConfig.heightMargin * 2;
-
- var treeLayout = d3.layout.tree().size([height, width]);
-
- svg = d3.select($element[0]).append('svg').style('width', el.clientWidth + 'px').style('height', el.clientHeight + 'px');
-
- var treeContainer = svg.append('g').attr('transform', 'translate(' + serviceTopologyConfig.widthMargin * 2 + ',' + serviceTopologyConfig.heightMargin + ')');
-
- root = tree;
- root.x0 = height / 2;
- root.y0 = width / 2;
-
- // ServiceTopologyHelper.drawLegend(svg);
- ServiceTopologyHelper.updateTree(treeContainer, treeLayout, root, el);
- };
-
- $scope.$watch(function () {
- return _this.serviceChain;
- }, function (chain) {
- if (angular.isDefined(chain)) {
- draw(chain);
- }
- });
- }]
- };
- });
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').service('Services', ["$resource", function ($resource) {
- return $resource('/xos/services/:id', { id: '@id' });
- }]).service('Tenant', ["$resource", function ($resource) {
- return $resource('/xos/tenants', { id: '@id' }, {
- queryVsgInstances: {
- method: 'GET',
- isArray: true,
- interceptor: {
- response: function response(res) {
-
- // NOTE
- // Note that VCPETenant is now VSGTenant.
-
- var instances = [];
-
- angular.forEach(res.data, function (tenant) {
- var info = JSON.parse(tenant.service_specific_attribute);
- if (info && info.instance_id) {
- instances.push(info.instance_id);
- }
- });
-
- return instances;
- }
- }
- },
- getSubscriberTag: {
- method: 'GET',
- isArray: true,
- interceptor: {
- response: function response(res) {
- // NOTE we should receive only one vOLT tenant here
- return JSON.parse(res.data[0].service_specific_attribute);
- }
- }
- }
- });
- }]).service('Ceilometer', ["$http", "$q", "Instances", function ($http, $q, Instances) {
- var _this = this;
-
- /**
- * Get stats for a single instance
- */
- this.getInstanceStats = function (instanceUuid) {
- var deferred = $q.defer();
-
- $http.get('/xoslib/xos-instance-statistics', { params: { 'instance-uuid': instanceUuid } }).then(function (res) {
- deferred.resolve(res.data);
- })['catch'](function (e) {
- deferred.reject(e);
- });
-
- return deferred.promise;
- };
-
- /**
- * Collect stats for an array of instances
- */
- this.getInstancesStats = function (instances) {
- var deferred = $q.defer();
- var instancePromises = [];
- var instanceList = [];
-
- // retrieve instance details
- instances.forEach(function (instanceId) {
- instancePromises.push(Instances.get({ id: instanceId }).$promise);
- });
-
- // get all instance data
- $q.all(instancePromises).then(function (_instanceList) {
- instanceList = _instanceList;
- var promises = [];
- // foreach instance query stats
- instanceList.forEach(function (instance) {
- promises.push(_this.getInstanceStats(instance.instance_uuid));
- });
- return $q.all(promises);
- }).then(function (stats) {
- // augment instance with stats information
- instanceList.map(function (instance, i) {
- instance.stats = stats[i];
- });
- deferred.resolve(instanceList);
- })['catch'](deferred.reject);
-
- return deferred.promise;
- };
-
- this.getContainerStats = function (containerName) {
- var deferred = $q.defer();
-
- var res = {};
-
- $http.get('/xoslib/meterstatistics', { params: { 'resource': containerName } }).then(function (containerStats) {
- res.stats = containerStats.data;
- return $http.get('/xoslib/meterstatistics', { params: { 'resource': containerName + '-eth0' } });
- }).then(function (portStats) {
- res.port = {
- eth0: portStats.data
- };
- return $http.get('/xoslib/meterstatistics', { params: { 'resource': containerName + '-eth1' } });
- }).then(function (portStats) {
- res.port.eth1 = portStats.data;
- deferred.resolve(res);
- })['catch'](function (e) {
- deferred.reject(e);
- });
-
- return deferred.promise;
- };
- }]).service('Slice', ["$resource", function ($resource) {
- return $resource('/xos/slices', { id: '@id' });
- }]).service('Instances', ["$resource", function ($resource) {
- return $resource('/xos/instances/:id', { id: '@id' });
- }]).service('Node', ["$resource", "$q", "Instances", function ($resource, $q, Instances) {
- return $resource('/xos/nodes', { id: '@id' }, {
- queryWithInstances: {
- method: 'GET',
- isArray: true,
- interceptor: {
- response: function response(res) {
-
- // TODO update the API to include instances in nodes
- // http://stackoverflow.com/questions/14573102/how-do-i-include-related-model-fields-using-django-rest-framework
-
- var deferred = $q.defer();
-
- var requests = [];
-
- angular.forEach(res.data, function (node) {
- requests.push(Instances.query({ node: node.id }).$promise);
- });
-
- $q.all(requests).then(function (list) {
- res.data.map(function (node, i) {
- node.instances = list[i];
- return node;
- });
- deferred.resolve(res.data);
- });
-
- return deferred.promise;
- }
- }
- }
- });
- }]).service('Subscribers', ["$resource", "$q", "SubscriberDevice", function ($resource, $q, SubscriberDevice) {
- return $resource('/xoslib/cordsubscriber/:id', { id: '@id' }, {
- update: {
- method: 'PUT',
- isArray: false
- },
- queryWithDevices: {
- method: 'GET',
- isArray: true,
- interceptor: {
- response: function response(res) {
-
- /**
- * For each subscriber retrieve devices and append them
- */
-
- var deferred = $q.defer();
-
- var requests = [];
-
- angular.forEach(res.data, function (subscriber) {
- requests.push(SubscriberDevice.query({ id: subscriber.id }).$promise);
- });
-
- $q.all(requests).then(function (list) {
-
- // adding devices
-
- res.data.map(function (subscriber, i) {
- subscriber.devices = list[i];
- subscriber.type = 'subscriber';
-
- subscriber.devices.map(function (d) {
- return d.type = 'device';
- });
-
- return subscriber;
- });
-
- // faking to have 2 subscriber
- // res.data.push(angular.copy(res.data[0]));
-
- deferred.resolve(res.data);
- });
-
- return deferred.promise;
- }
- }
- },
- getWithDevices: {
- method: 'GET',
- isArray: false,
- interceptor: {
- response: function response(res) {
- var d = $q.defer();
-
- SubscriberDevice.query({ id: res.data.id }).$promise.then(function (devices) {
- devices.map(function (d) {
- return d.type = 'device';
- });
- res.data.devices = devices;
- res.data.type = 'subscriber';
- d.resolve(res.data);
- })['catch'](function (err) {
- d.reject(err);
- });
-
- return d.promise;
- }
- }
- }
- });
- }]).service('SubscriberDevice', ["$resource", function ($resource) {
- return $resource('/xoslib/rs/subscriber/:id/users/', { id: '@id' });
- }]).service('ServiceRelation', ["$q", "lodash", "Services", "Tenant", "Slice", "Instances", function ($q, lodash, Services, Tenant, Slice, Instances) {
-
- // count the mas depth of an object
- var depthOf = function depthOf(obj) {
- var depth = 0;
- if (obj.children) {
- obj.children.forEach(function (d) {
- var tmpDepth = depthOf(d);
- if (tmpDepth > depth) {
- depth = tmpDepth;
- }
- });
- }
- return 1 + depth;
- };
-
- // find all the relation defined for a given root
- var findLevelRelation = function findLevelRelation(tenants, rootId) {
- return lodash.filter(tenants, function (service) {
- return service.subscriber_service === rootId;
- });
- };
-
- var findSpecificInformation = function findSpecificInformation(tenants, rootId) {
- var tenants = lodash.filter(tenants, function (service) {
- return service.provider_service === rootId && service.subscriber_tenant;
- });
-
- var info;
-
- tenants.forEach(function (tenant) {
- if (tenant.service_specific_attribute) {
- info = JSON.parse(tenant.service_specific_attribute);
- }
- });
-
- return info;
- };
-
- // find all the service defined by a given array of relations
- var findLevelServices = function findLevelServices(relations, services) {
- var levelServices = [];
- lodash.forEach(relations, function (tenant) {
- var service = lodash.find(services, { id: tenant.provider_service });
- levelServices.push(service);
- });
- return levelServices;
- };
-
- var buildLevel = function buildLevel(tenants, services, rootService, rootTenant) {
- var parentName = arguments.length <= 4 || arguments[4] === undefined ? null : arguments[4];
-
- // build an array of unlinked services
- // these are the services that should still placed in the tree
- var unlinkedServices = lodash.difference(services, [rootService]);
-
- // find all relations relative to this rootElement
- var levelRelation = findLevelRelation(tenants, rootService.id);
- // find all items related to rootElement
- var levelServices = findLevelServices(levelRelation, services);
-
- // remove this item from the list (performance
- unlinkedServices = lodash.difference(unlinkedServices, levelServices);
-
- rootService.service_specific_attribute = findSpecificInformation(tenants, rootService.id);
-
- if (rootService.humanReadableName === 'service_vbng') {
- rootService.humanReadableName = 'service_vrouter';
- }
-
- var tree = {
- name: rootService.humanReadableName,
- parent: parentName,
- type: 'service',
- service: rootService,
- tenant: rootTenant,
- children: []
- };
-
- lodash.forEach(levelServices, function (service) {
- if (service.humanReadableName === 'service_ONOS_vBNG' || service.humanReadableName === 'service_ONOS_vOLT') {
- // remove ONOSes from service chart
- return;
- }
- var tenant = lodash.find(tenants, { subscriber_tenant: rootTenant.id, provider_service: service.id });
- tree.children.push(buildLevel(tenants, unlinkedServices, service, tenant, rootService.humanReadableName));
- });
-
- // if it is the last element append internet
- if (tree.children.length === 0) {
- tree.children.push({
- name: 'Router',
- type: 'router',
- children: []
- });
- }
-
- return tree;
- };
-
- var buildSubscriberServiceTree = function buildSubscriberServiceTree(services, tenants) {
- var subscriber = arguments.length <= 2 || arguments[2] === undefined ? { id: 1, name: 'fakeSubs' } : arguments[2];
-
- // find the root service
- // it is the one attached to subsriber_root
- // as now we have only one root so this can work
- var rootTenant = lodash.find(tenants, { subscriber_root: subscriber.id });
- var rootService = lodash.find(services, { id: rootTenant.provider_service });
-
- var serviceTree = buildLevel(tenants, services, rootService, rootTenant);
-
- return {
- name: subscriber.name || subscriber.humanReadableName,
- parent: null,
- type: 'subscriber',
- children: [serviceTree]
- };
- };
-
- // applying domain knowledge to build the global service tree
- var buildServiceTree = function buildServiceTree(services, tenants) {
-
- // TODO refactor
- var buildChild = function buildChild(services, tenants, currentService) {
-
- if (currentService.humanReadableName === 'service_vbng') {
- currentService.humanReadableName = 'service_vrouter';
- }
-
- var response = {
- type: 'service',
- name: currentService.humanReadableName,
- service: currentService
- };
-
- var tenant = lodash.find(tenants, { subscriber_service: currentService.id });
- if (tenant) {
- var next = lodash.find(services, { id: tenant.provider_service });
- response.children = [buildChild(services, tenants, next)];
- } else {
- response.children = [{
- name: 'Router',
- type: 'router',
- children: []
- }];
- }
- delete currentService.id; // conflict with d3
- return response;
- };
-
- var baseService = lodash.find(services, { id: 3 });
-
- if (!angular.isDefined(baseService)) {
- console.error('Missing Base service!');
- return;
- }
-
- var baseData = {
- name: 'Subscriber',
- type: 'subscriber',
- parent: null,
- children: [buildChild(services, tenants, baseService)]
- };
- return baseData;
- };
-
- var getBySubscriber = function getBySubscriber(subscriber) {
- var deferred = $q.defer();
- var services, tenants;
- Services.query().$promise.then(function (res) {
- services = res;
- return Tenant.query().$promise;
- }).then(function (res) {
- tenants = res;
- deferred.resolve(buildSubscriberServiceTree(services, tenants, subscriber));
- })['catch'](function (e) {
- throw new Error(e);
- });
-
- return deferred.promise;
- };
-
- var get = function get() {
- var deferred = $q.defer();
- var services, tenants;
- Services.query().$promise.then(function (res) {
- services = res;
- return Tenant.query({ kind: 'coarse' }).$promise;
- }).then(function (res) {
- tenants = res;
- deferred.resolve(buildServiceTree(services, tenants));
- })['catch'](function (e) {
- throw new Error(e);
- });
-
- return deferred.promise;
- };
-
- // export APIs
- return {
- get: get,
- buildServiceTree: buildServiceTree,
- getBySubscriber: getBySubscriber,
- buildLevel: buildLevel,
- buildSubscriberServiceTree: buildSubscriberServiceTree,
- findLevelRelation: findLevelRelation,
- findLevelServices: findLevelServices,
- depthOf: depthOf,
- findSpecificInformation: findSpecificInformation
- };
- }]);
-})();
-'use strict';
-
-var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
-
-(function () {
- angular.module('xos.diagnostic').service('RackHelper', ["serviceTopologyConfig", "lodash", function (serviceTopologyConfig, lodash) {
- var _this = this;
-
- this.getComputeNodeLabelSize = function () {
- return serviceTopologyConfig.computeNode.labelHeight + serviceTopologyConfig.instance.margin * 2;
- };
-
- /**
- * Given a list of instance should get the Compute Node size.
- * They are placed in rows of 2 with 5px margin on each side.
- */
-
- this.getComputeNodeSize = lodash.memoize(function (instances) {
- var width = serviceTopologyConfig.instance.margin * 3 + serviceTopologyConfig.instance.width * 2;
-
- var rows = Math.round(instances.length / 2);
-
- var labelSpace = _this.getComputeNodeLabelSize();
-
- var height = serviceTopologyConfig.instance.height * rows + serviceTopologyConfig.instance.margin * (rows + 1) + labelSpace;
-
- return [width, height];
- });
-
- /**
- * Give a list on Compute Node should calculate the Rack Size.
- * Compute nodes are placed in a single column with 5px margin on each side.
- */
- this.getRackSize = function (nodes) {
-
- var width = 0;
- var height = serviceTopologyConfig.computeNode.margin;
-
- lodash.forEach(nodes, function (node) {
- var _getComputeNodeSize = _this.getComputeNodeSize(node.instances);
-
- var _getComputeNodeSize2 = _slicedToArray(_getComputeNodeSize, 2);
-
- var nodeWidth = _getComputeNodeSize2[0];
- var nodeHeight = _getComputeNodeSize2[1];
-
- width = nodeWidth + serviceTopologyConfig.computeNode.margin * 2;
- height += nodeHeight + serviceTopologyConfig.computeNode.margin;
- });
-
- return [width, height];
- };
-
- /**
- * Given an instance index, return the coordinates
- */
-
- this.getInstancePosition = function (position) {
- var row = Math.floor(position / 2);
- var column = position % 2 ? 1 : 0;
-
- // add ComputeNode label size
- var labelSpace = _this.getComputeNodeLabelSize();
-
- // x = margin + (width * column) + ( maring * column)
- var x = serviceTopologyConfig.instance.margin + serviceTopologyConfig.instance.width * column + serviceTopologyConfig.instance.margin * column;
-
- // y = label + margin + (height * row) + ( maring * row)
- var y = labelSpace + serviceTopologyConfig.instance.margin + serviceTopologyConfig.instance.height * row + serviceTopologyConfig.instance.margin * row;
- return [x, y];
- };
-
- /**
- * Given an Compute Node index, return the coordinates
- */
-
- this.getComputeNodePosition = function (nodes, position) {
-
- var x = serviceTopologyConfig.computeNode.margin;
-
- var previousElEight = lodash.reduce(nodes.slice(0, position), function (val, node) {
- return val + _this.getComputeNodeSize(node.instances)[1];
- }, 0);
-
- var y = serviceTopologyConfig.computeNode.margin + serviceTopologyConfig.computeNode.margin * position + previousElEight;
-
- return [x, y];
- };
- }]);
-})();
-'use strict';
-
-var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
-
-(function () {
- 'use strict';
-
- var shapes = {
- cloud: ' M 79.72 49.60 C 86.00 37.29 98.57 29.01 111.96 26.42 C 124.27 24.11 137.53 26.15 148.18 32.90 C 158.08 38.78 165.39 48.87 167.65 60.20 C 176.20 57.90 185.14 56.01 194.00 57.73 C 206.08 59.59 217.92 66.01 224.37 76.66 C 227.51 81.54 228.85 87.33 229.23 93.06 C 237.59 93.33 246.22 95.10 253.04 100.19 C 256.69 103.13 259.87 107.67 258.91 112.59 C 257.95 118.43 252.78 122.38 247.78 124.82 C 235.27 130.43 220.23 130.09 207.98 123.93 C 199.33 127.88 189.76 129.43 180.30 128.57 C 173.70 139.92 161.70 147.65 148.86 149.93 C 133.10 153.26 116.06 148.15 104.42 137.08 C 92.98 143.04 78.96 143.87 66.97 139.04 C 57.75 135.41 49.70 128.00 46.60 118.43 C 43.87 109.95 45.81 100.29 51.30 93.32 C 57.38 85.18 67.10 80.44 76.99 78.89 C 74.38 69.20 74.87 58.52 79.72 49.60 Z'
- };
-
- var computeNodeId = 0;
- var instanceId = 0;
-
- angular.module('xos.diagnostic').service('NodeDrawer', ["d3", "serviceTopologyConfig", "RackHelper", "lodash", function (d3, serviceTopologyConfig, RackHelper, lodash) {
- var _this2 = this;
-
- var _this = this;
-
- this.addNetworks = function (nodes) {
-
- // clean childs
- nodes.selectAll('*').remove();
-
- nodes.append('path').attr({
- d: shapes.cloud,
- transform: 'translate(-100, -72), scale(0.7)',
- 'class': 'cloud'
- });
-
- nodes.append('text').attr({
- 'text-anchor': 'middle',
- y: -5,
- x: 5
- }).text(function (d) {
- return d.name;
- });
-
- nodes.append('text').attr({
- 'text-anchor': 'middle',
- y: 8,
- x: 5,
- 'class': 'small'
- }).text(function (d) {
- return d.subtitle;
- });
-
- nodes.each(function (n) {
- var currentNode = d3.select(this);
- // cicle trouch node to add Tags and Public IP
- if (n.name === 'LAN-Side' && angular.isDefined(n.subscriberTag)) {
- currentNode.append('text').attr({
- 'text-anchor': 'middle',
- y: 50
- }).text(function () {
- return 'C-Tag: ' + n.subscriberTag.cTag;
- });
-
- currentNode.append('text').attr({
- 'text-anchor': 'middle',
- y: 70
- }).text(function () {
- return 'S-Tag: ' + n.subscriberTag.sTag;
- });
- }
-
- if (n.name === 'WAN-Side' && angular.isDefined(n.subscriberIP)) {
- currentNode.append('text').attr({
- 'text-anchor': 'middle',
- y: 50
- }).text(function () {
- return 'Public IP: ' + n.subscriberIP;
- });
- }
- });
- };
-
- this.addRack = function (nodes) {
-
- // loop because of D3
- // rack will be only one
- nodes.each(function (d) {
- var _RackHelper$getRackSize = RackHelper.getRackSize(d.computeNodes);
-
- var _RackHelper$getRackSize2 = _slicedToArray(_RackHelper$getRackSize, 2);
-
- var w = _RackHelper$getRackSize2[0];
- var h = _RackHelper$getRackSize2[1];
-
- // TODO update instead of delete and redraw
- nodes.select('g').remove();
-
- var rack = nodes.append('g');
-
- rack.attr({
- transform: 'translate(0,0)'
- }).transition().duration(serviceTopologyConfig.duration).attr({
- transform: function transform() {
- return 'translate(' + -(w / 2) + ', ' + -(h / 2) + ')';
- }
- });
-
- rack.append('rect').attr({
- width: 0,
- height: 0
- }).transition().duration(serviceTopologyConfig.duration).attr({
- width: w,
- height: h
- });
-
- rack.append('text').attr({
- 'text-anchor': 'middle',
- y: -10,
- x: w / 2,
- opacity: 0
- }).text(function (d) {
- return d.name;
- }).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- _this2.drawComputeNodes(rack, d.computeNodes);
- });
- };
-
- this.drawComputeNodes = function (container, nodes) {
-
- var elements = container.selectAll('.compute-nodes').data(nodes, function (d) {
- if (!angular.isString(d.d3Id)) {
- d.d3Id = 'compute-node-' + ++computeNodeId;
- }
- return d.d3Id;
- });
-
- var _container$node$getBoundingClientRect = container.node().getBoundingClientRect();
-
- var width = _container$node$getBoundingClientRect.width;
- var height = _container$node$getBoundingClientRect.height;
-
- var nodeContainer = elements.enter().append('g');
-
- nodeContainer.attr({
- transform: 'translate(' + width / 2 + ', ' + height / 2 + ')',
- 'class': 'compute-node'
- }).transition().duration(serviceTopologyConfig.duration).attr({
- transform: function transform(d) {
- return 'translate(' + RackHelper.getComputeNodePosition(nodes, d.d3Id.replace('compute-node-', '') - 1) + ')';
- }
- });
-
- nodeContainer.append('rect').attr({
- width: 0,
- height: 0
- }).transition().duration(serviceTopologyConfig.duration).attr({
- width: function width(d) {
- return RackHelper.getComputeNodeSize(d.instances)[0];
- },
- height: function height(d) {
- return RackHelper.getComputeNodeSize(d.instances)[1];
- }
- });
-
- nodeContainer.append('text').attr({
- 'text-anchor': 'start',
- y: 17, //FIXME
- x: 10, //FIXME
- opacity: 0
- }).text(function (d) {
- return d.humanReadableName.split('.')[0];
- }).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- // if there are Compute Nodes
- if (nodeContainer.length > 0) {
- // draw instances for each compute node
- nodeContainer.each(function (a) {
- _this.drawInstances(d3.select(this), a.instances);
- });
- }
- };
-
- // NOTE Stripping unuseful names to shorten labels.
- // This is not elegant
- var formatInstanceName = function formatInstanceName(name) {
- return name.replace('app_', '').replace('service_', '')
- // .replace('ovs_', '')
- .replace('mysite_', '').replace('_instance', '');
- };
-
- var getInstanceStatusColor = function getInstanceStatusColor(instance) {
- function startWith(val, string) {
- return string.substring(0, val.length) === val;
- }
-
- if (startWith('0 - ', instance.backend_status)) {
- return 'provisioning';
- }
- if (startWith('1 - ', instance.backend_status)) {
- return 'good';
- }
- if (startWith('2 - ', instance.backend_status)) {
- return 'bad';
- } else {
- return '';
- }
- };
-
- var drawContainer = function drawContainer(container, docker) {
-
- var containerBox = container.append('g').attr({
- 'class': 'container',
- transform: 'translate(' + serviceTopologyConfig.instance.margin + ', 115)'
- });
-
- containerBox.append('rect').attr({
- width: 250 - serviceTopologyConfig.container.margin * 2,
- height: serviceTopologyConfig.container.height
- });
-
- containerBox.append('text').attr({
- y: 20,
- x: serviceTopologyConfig.instance.margin,
- 'class': 'name'
- }).text(docker.name);
-
- // add stats
- var interestingMeters = ['memory', 'memory.usage', 'cpu_util'];
-
- interestingMeters.forEach(function (m, i) {
- var meter = lodash.find(docker.stats, { meter: m });
- // if there is no meter stats skip rendering
- if (!angular.isDefined(meter)) {
- return;
- }
- containerBox.append('text').attr({
- y: 40 + i * 15,
- x: serviceTopologyConfig.instance.margin,
- opacity: 0
- }).text(meter.description + ': ' + Math.round(meter.value) + ' ' + meter.unit).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
- });
-
- // add port stats
- var ports = ['eth0', 'eth1'];
- var interestingPortMeters = [{
- meter: 'network.incoming.bytes.rate',
- label: 'Incoming'
- }, {
- meter: 'network.outgoing.bytes.rate',
- label: 'Outgoing'
- }];
-
- ports.forEach(function (p, j) {
-
- // if there are no port stats skip rendering
- if (docker.port[p].length === 0) {
- return;
- }
-
- containerBox.append('text').attr({
- y: 90,
- x: serviceTopologyConfig.instance.margin + 120 * j,
- 'class': 'name'
- }).text(docker.name + '-' + p);
-
- interestingPortMeters.forEach(function (m, i) {
-
- var meter = lodash.find(docker.port[p], { meter: m.meter });
- // if there is no meter stats skip rendering
- if (!angular.isDefined(meter)) {
- return;
- }
- containerBox.append('text').attr({
- y: 105 + i * 15,
- x: serviceTopologyConfig.instance.margin + 120 * j,
- opacity: 0
- }).text(m.label + ': ' + Math.round(meter.value) + ' ' + meter.unit).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
- });
- });
- };
-
- var showInstanceStats = function showInstanceStats(container, instance) {
-
- // NOTE this should be dinamically positioned
- // base on the number of element present
-
- // fake the position
- var translation = {
- 'mysite_vsg-1': '200, -120',
- 'mysite_vsg-2': '-300, 30',
- 'mysite_vsg-3': '-300, -250'
- };
-
- var statsContainer = container.append('g').attr({
- transform: 'translate(' + (translation[instance.humanReadableName] || translation['mysite_vsg-1']) + ')',
- 'class': 'stats-container'
- }).on('click', function (d) {
- // toggling visisbility
- d.fade = !d.fade;
- var opacity = undefined;
- if (d.fade) {
- opacity = 0.1;
- } else {
- opacity = 1;
- }
-
- d3.select(this).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: opacity
- });
- });
-
- var lines = {
- 'mysite_vsg-1': {
- x1: -160,
- y1: 120,
- x2: 0,
- y2: 50
- },
- 'mysite_vsg-2': {
- x1: 250,
- y1: 50,
- x2: 300,
- y2: -10
- },
- 'mysite_vsg-3': {
- x1: 250,
- y1: 50,
- x2: 300,
- y2: 270
- }
- };
-
- statsContainer.append('line').attr({
- x1: function x1(d) {
- return lines[d.humanReadableName].x1 || lines['mysite_vsg-1'].x1;
- },
- y1: function y1(d) {
- return lines[d.humanReadableName].y1 || lines['mysite_vsg-1'].y1;
- },
- x2: function x2(d) {
- return lines[d.humanReadableName].x2 || lines['mysite_vsg-1'].x2;
- },
- y2: function y2(d) {
- return lines[d.humanReadableName].y2 || lines['mysite_vsg-1'].y2;
- },
- stroke: 'black',
- opacity: 0
- }).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- // NOTE rect should be dinamically sized base on the presence of a container
- var statsHeight = 110;
- var statsWidth = 250;
-
- if (instance.container) {
- statsHeight += serviceTopologyConfig.container.height + serviceTopologyConfig.container.margin * 2;
- }
-
- var statsVignette = statsContainer.append('rect').attr({
- width: statsWidth,
- height: statsHeight,
- opacity: 0
- }).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- // add instance info
- statsContainer.append('text').attr({
- y: 15,
- x: serviceTopologyConfig.instance.margin,
- 'class': 'name',
- opacity: 0
- }).text(instance.humanReadableName).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- statsContainer.append('text').attr({
- y: 30,
- x: serviceTopologyConfig.instance.margin,
- 'class': 'ip',
- opacity: 0
- }).text(instance.ip).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- // add stats
- var interestingMeters = ['memory', 'memory.usage', 'cpu', 'cpu_util'];
-
- interestingMeters.forEach(function (m, i) {
- var meter = lodash.find(instance.stats, { meter: m });
-
- if (meter) {
-
- statsContainer.append('text').attr({
- y: 55 + i * 15,
- x: serviceTopologyConfig.instance.margin,
- opacity: 0
- }).text(meter.description + ': ' + Math.round(meter.value) + ' ' + meter.unit).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
- }
- });
-
- if (instance.container) {
- // draw container
- drawContainer(statsContainer, instance.container);
- }
- };
-
- this.drawInstances = function (container, instances) {
-
- // TODO check for stats field in instance and draw popup
-
- var _container$node$getBoundingClientRect2 = container.node().getBoundingClientRect();
-
- var width = _container$node$getBoundingClientRect2.width;
- var height = _container$node$getBoundingClientRect2.height;
-
- var elements = container.selectAll('.instances').data(instances, function (d) {
- return angular.isString(d.d3Id) ? d.d3Id : d.d3Id = 'instance-' + ++instanceId;
- });
-
- var instanceContainer = elements.enter().append('g');
-
- instanceContainer.attr({
- transform: 'translate(' + width / 2 + ', ' + height / 2 + ')',
- 'class': function _class(d) {
- return 'instance ' + (d.selected ? 'active' : '') + ' ' + getInstanceStatusColor(d);
- }
- }).transition().duration(serviceTopologyConfig.duration).attr({
- transform: function transform(d, i) {
- return 'translate(' + RackHelper.getInstancePosition(i) + ')';
- }
- });
-
- instanceContainer.append('rect').attr({
- width: 0,
- height: 0
- }).transition().duration(serviceTopologyConfig.duration).attr({
- width: serviceTopologyConfig.instance.width,
- height: serviceTopologyConfig.instance.height
- });
-
- instanceContainer.append('text').attr({
- 'text-anchor': 'middle',
- y: 23, //FIXME
- x: 40, //FIXME
- opacity: 0
- }).text(function (d) {
- return formatInstanceName(d.humanReadableName);
- }).transition().duration(serviceTopologyConfig.duration).attr({
- opacity: 1
- });
-
- // if stats are attached and instance is active,
- // draw stats
- instanceContainer.each(function (instance, i) {
-
- var container = d3.select(this);
-
- if (angular.isDefined(instance.stats) && instance.selected) {
- showInstanceStats(container, instance, i);
- }
- });
-
- // instanceContainer
- // .on('click', function(d){
- // console.log(`Draw vignette with stats for instance: ${d.name}`);
- // });
- };
-
- this.addPhisical = function (nodes) {
-
- nodes.select('rect').remove();
- nodes.select('text').remove();
-
- nodes.append('rect').attr(serviceTopologyConfig.square);
-
- nodes.append('text').attr({
- 'text-anchor': 'middle',
- y: serviceTopologyConfig.square.y - 10
- }).text(function (d) {
- return d.name || d.humanReadableName;
- });
- };
-
- this.addDevice = function (nodes) {
- nodes.append('circle').attr(serviceTopologyConfig.circle);
-
- nodes.append('text').attr({
- 'text-anchor': 'end',
- x: -serviceTopologyConfig.circle.r - 10,
- y: serviceTopologyConfig.circle.r / 2
- }).text(function (d) {
- return d.name || d.mac;
- });
- };
- }]);
-})();
-'use strict';
-
-var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').service('LogicTopologyHelper', ["$window", "$log", "$rootScope", "lodash", "serviceTopologyConfig", "NodeDrawer", "ChartData", function ($window, $log, $rootScope, lodash, serviceTopologyConfig, NodeDrawer, ChartData) {
- var _this = this;
-
- var diagonal,
- nodes,
- links,
- i = 0,
- svgWidth,
- svgHeight,
- layout;
-
- var baseData = ChartData.logicTopologyData;
-
- /**
- * Calculate the horizontal position for each element.
- * subsrcribers, devices and routers have the same fixed width 20
- * network have a fixed width 104
- * rack have a fixed width 105
- * build and array of 6 elements representing the position of each element in the svg
- * to equally space them
- */
-
- this.computeElementPosition = function (svgWidth) {
-
- var xPos = [];
-
- var totalElWidth = lodash.reduce(serviceTopologyConfig.elWidths, function (el, val) {
- return val + el;
- }, 0);
-
- var remainingSpace = svgWidth - totalElWidth - serviceTopologyConfig.widthMargin * 2;
-
- var step = remainingSpace / (serviceTopologyConfig.elWidths.length - 1);
-
- lodash.forEach(serviceTopologyConfig.elWidths, function (el, i) {
-
- // get half of the previous elements width
- var previousElWidth = 0;
- if (i !== 0) {
- previousElWidth = lodash.reduce(serviceTopologyConfig.elWidths.slice(0, i), function (el, val) {
- return val + el;
- }, 0);
- }
-
- var elPos = serviceTopologyConfig.widthMargin // right margin
- + step * i // space between elements
- + el / 2 // this el width
- + previousElWidth; // previous elements width
-
- xPos.push(svgWidth - elPos);
- });
-
- return xPos;
- };
-
- /**
- * from a nested data structure,
- * create nodes and links for a D3 Tree Layout
- */
- var computeLayout = function computeLayout(data) {
- var nodes = layout.nodes(data);
-
- // Normalize for fixed-depth.
- nodes.forEach(function (d) {
- // position the child node horizontally
- d.y = _this.computeElementPosition(svgWidth)[d.depth];
- });
-
- var links = layout.links(nodes);
-
- return [nodes, links];
- };
-
- /**
- * Draw the containing group for any node or update the existing one
- */
- var drawNodes = function drawNodes(svg, nodes) {
- // Update the nodes…
- var node = svg.selectAll('g.node').data(nodes, function (d) {
- if (!angular.isString(d.d3Id)) {
- d.d3Id = 'tree-' + ++i;
- }
- return d.d3Id;
- });
-
- // Enter any new nodes
- var nodeEnter = node.enter().append('g').attr({
- 'class': function _class(d) {
- return 'node ' + d.type;
- },
- transform: 'translate(' + svgWidth / 2 + ', ' + svgHeight / 2 + ')'
- });
-
- // create Nodes
- NodeDrawer.addNetworks(node.filter('.network'));
- NodeDrawer.addRack(node.filter('.rack'));
- NodeDrawer.addPhisical(node.filter('.router'));
- NodeDrawer.addPhisical(node.filter('.subscriber'));
- NodeDrawer.addDevice(node.filter('.device'));
-
- // add event listener to subscriber
- node.filter('.subscriber').on('click', function () {
- $rootScope.$emit('subscriber.modal.open');
- });
-
- //update nodes
- // TODO if data change, only update them
- // NodeDrawer.updateRack(node.filter('.rack'));
-
- // Transition nodes to their new position.
- var nodeUpdate = node.transition().duration(serviceTopologyConfig.duration).attr({
- 'transform': function transform(d) {
- return 'translate(' + d.y + ',' + d.x + ')';
- }
- });
-
- // TODO handle node remove
- var nodeExit = node.exit().remove();
- };
-
- /**
- * Handle links in the tree layout
- */
- var drawLinks = function drawLinks(svg, links) {
-
- diagonal = d3.svg.diagonal().projection(function (d) {
- return [d.y, d.x];
- });
-
- // Update the links…
- var link = svg.selectAll('path.link').data(links, function (d) {
- return d.target.d3Id;
- });
-
- // Enter any new links at the parent's previous position.
- link.enter().insert('path', 'g').attr('class', function (d) {
- return 'link ' + d.target.type;
- }).attr('d', function (d) {
- var o = { x: svgHeight / 2, y: svgWidth / 2 };
- return diagonal({ source: o, target: o });
- });
-
- // Transition links to their new position.
- link.transition().duration(serviceTopologyConfig.duration).attr('d', diagonal);
-
- link.exit().remove();
- };
-
- /**
- * Calculate the svg size and setup tree layout
- */
- this.setupTree = function (svg) {
-
- svgWidth = svg.node().getBoundingClientRect().width;
- svgHeight = svg.node().getBoundingClientRect().height;
-
- var width = svgWidth - serviceTopologyConfig.widthMargin * 2;
- var height = svgHeight - serviceTopologyConfig.heightMargin * 2;
-
- layout = d3.layout.tree().size([height, width]);
- };
-
- /**
- * Update the tree layout
- */
-
- this.updateTree = function (svg) {
-
- // console.log(baseData);
-
- var _computeLayout = computeLayout(baseData);
-
- // Compute the new tree layout.
-
- var _computeLayout2 = _slicedToArray(_computeLayout, 2);
-
- nodes = _computeLayout2[0];
- links = _computeLayout2[1];
- drawNodes(svg, nodes);
- drawLinks(svg, links);
- };
- }]);
-})();
-'use strict';
-
-(function () {
- 'use strict';
- angular.module('xos.diagnostic').directive('logicTopology', function () {
- return {
- restrict: 'E',
- scope: {
- subscribers: '=',
- selected: '='
- },
- bindToController: true,
- controllerAs: 'vm',
- templateUrl: 'templates/logicTopology.tpl.html',
- controller: ["$element", "$log", "$scope", "$rootScope", "$timeout", "d3", "LogicTopologyHelper", "Node", "Tenant", "Ceilometer", "serviceTopologyConfig", "ChartData", function controller($element, $log, $scope, $rootScope, $timeout, d3, LogicTopologyHelper, Node, Tenant, Ceilometer, serviceTopologyConfig, ChartData) {
- var _this2 = this;
-
- $log.info('Logic Plane');
-
- var svg;
- this.selectedInstances = [];
- this.hideInstanceStats = true;
- var _this = this;
-
- var handleSvg = function handleSvg(el) {
-
- d3.select($element[0]).select('svg').remove();
-
- svg = d3.select(el).append('svg').style('width', el.clientWidth + 'px').style('height', el.clientHeight + 'px');
- };
-
- var loadGlobalScope = function loadGlobalScope() {
- ChartData.getLogicTree().then(function (tree) {
- LogicTopologyHelper.updateTree(svg);
- });
- };
- loadGlobalScope();
-
- $scope.$watch(function () {
- return _this2.selected;
- }, function (selected) {
- if (selected) {
- ChartData.selectSubscriber(selected);
- LogicTopologyHelper.updateTree(svg);
- } else {
- ChartData.removeSubscriber();
- LogicTopologyHelper.updateTree(svg);
- }
- });
-
- $rootScope.$on('instance.detail.hide', function () {
- _this2.hideInstanceStats = true;
- $timeout(function () {
- _this2.selectedInstances = [];
- ChartData.highlightInstances([]);
- LogicTopologyHelper.updateTree(svg);
- }, 500);
- });
-
- $rootScope.$on('instance.detail', function (evt, service) {
- ChartData.getInstanceStatus(service).then(function (instances) {
- LogicTopologyHelper.updateTree(svg);
- })['catch'](function (e) {
- _this.error = 'Service statistics are not available at this time. Please try again later.';
- $timeout(function () {
- _this.error = null;
- }, 2000);
- });
- });
-
- d3.select(window).on('resize.logic', function () {
- handleSvg($element[0]);
- LogicTopologyHelper.setupTree(svg);
- LogicTopologyHelper.updateTree(svg);
- });
-
- handleSvg($element[0]);
- LogicTopologyHelper.setupTree(svg);
-
- this.selectSubscriberModal = function () {
- _this2.openSelectSubscriberModal = true;
- $scope.$apply();
- };
-
- this.subscriberStatusModal = function () {
- _this2.openSubscriberStatusModal = true;
- $scope.$apply();
- };
-
- // listen for subscriber modal event
- $rootScope.$on('subscriber.modal.open', function () {
-
- if (ChartData.currentSubscriber) {
- _this2.subscriberStatusModal();
- } else {
- _this2.selectSubscriberModal();
- }
- });
-
- // listen for subscriber modal event
- $rootScope.$on('subscriber.modal.open', function () {
-
- if (ChartData.currentSubscriber) {
- _this2.currentSubscriber = ChartData.currentSubscriber;
- _this2.subscriberStatusModal();
- } else {
- _this2.selectSubscriberModal();
- }
- });
- }]
- };
- });
-})();
-'use strict';
-
-(function () {
- 'use strict';
- angular.module('xos.diagnostic').directive('diagnosticContainer', function () {
- return {
- restrict: 'E',
- templateUrl: 'templates/diagnostic.tpl.html',
- controllerAs: 'vm',
- controller: ["ChartData", "Subscribers", "ServiceRelation", "$rootScope", "$log", function controller(ChartData, Subscribers, ServiceRelation, $rootScope, $log) {
- var _this = this;
-
- this.loader = true;
- this.error = false;
-
- var loadGlobalScope = function loadGlobalScope() {
- Subscribers.query().$promise.then(function (subscribers) {
- _this.subscribers = subscribers;
- return ServiceRelation.get();
- }).then(function (serviceChain) {
- _this.serviceChain = serviceChain;
- // debug helper
- // loadSubscriber(this.subscribers[0]);
- })['catch'](function (e) {
- throw new Error(e);
- _this.error = e;
- })['finally'](function () {
- _this.loader = false;
- });
- };
-
- loadGlobalScope();
-
- this.reloadGlobalScope = function () {
- _this.selectedSubscriber = null;
- loadGlobalScope();
- };
-
- var loadSubscriber = function loadSubscriber(subscriber) {
- ServiceRelation.getBySubscriber(subscriber).then(function (serviceChain) {
- _this.serviceChain = serviceChain;
- ChartData.currentServiceChain = serviceChain;
- return Subscribers.getWithDevices({ id: subscriber.id }).$promise;
- }).then(function (subscriber) {
- _this.selectedSubscriber = subscriber;
- ChartData.currentSubscriber = subscriber;
- });
- };
-
- $rootScope.$on('subscriber.selected', function (evt, subscriber) {
- loadSubscriber(subscriber);
- });
- }]
- };
- });
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').factory('d3', ["$window", function ($window) {
- return $window.d3;
- }]);
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').constant('serviceTopologyConfig', {
- widthMargin: 60,
- heightMargin: 30,
- duration: 750,
- elWidths: [20, 104, 105, 104, 20], //this is not true
- circle: {
- radius: 10,
- r: 10,
- selectedRadius: 15
- },
- square: {
- width: 20,
- height: 20,
- x: -10,
- y: -10
- },
- rack: {
- width: 105,
- height: 50,
- x: -30,
- y: -25
- },
- computeNode: {
- width: 50,
- height: 20,
- margin: 5,
- labelHeight: 10,
- x: -25,
- y: -10
- },
- instance: {
- width: 80,
- height: 36,
- margin: 5,
- x: -40,
- y: -18
- },
- container: {
- width: 60,
- height: 130,
- margin: 5,
- x: -30,
- y: -15
- }
- });
-})();
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.diagnostic').service('ChartData', ["$rootScope", "$q", "lodash", "Tenant", "Node", "serviceTopologyConfig", "Ceilometer", "Instances", function ($rootScope, $q, lodash, Tenant, Node, serviceTopologyConfig, Ceilometer, Instances) {
- var _this = this;
-
- this.currentSubscriber = null;
- this.currentServiceChain = null;
-
- this.logicTopologyData = {
- name: 'Router',
- type: 'router',
- children: [{
- name: 'WAN-Side',
- subtitle: 'Virtual Network',
- type: 'network',
- children: [{
- name: 'Compute Servers',
- type: 'rack',
- computeNodes: [],
- children: [{
- name: 'LAN-Side',
- subtitle: 'Virtual Network',
- type: 'network',
- children: [{
- name: 'Subscriber',
- type: 'subscriber'
- }] //subscribers goes here
- }]
- }]
- }]
- };
-
- this.getLogicTree = function () {
- var deferred = $q.defer();
-
- Node.queryWithInstances().$promise.then(function (computeNodes) {
- _this.logicTopologyData.children[0].children[0].computeNodes = computeNodes;
- // LogicTopologyHelper.updateTree(svg);
- deferred.resolve(_this.logicTopologyData);
- });
-
- return deferred.promise;
- };
-
- /**
- * Add Subscriber tag to LAN Network
- */
- this.addSubscriberTag = function (tags) {
- _this.logicTopologyData.children[0].children[0].children[0].subscriberTag = {
- cTag: tags.cTag,
- sTag: tags.sTag
- };
- };
-
- /**
- * Add Subscribers to the tree
- */
- this.addSubscriber = function (subscriber) {
- subscriber.children = subscriber.devices;
-
- // add subscriber to data tree
- _this.logicTopologyData.children[0].children[0].children[0].children = [subscriber];
- return _this.logicTopologyData;
- };
-
- /**
- * Remove a subscriber from the tree
- */
-
- this.removeSubscriber = function () {
- _this.logicTopologyData.children[0].children[0].children[0].children[0].humanReadableName = 'Subscriber';
- _this.currentSubscriber = null;
- if (serviceTopologyConfig.elWidths[serviceTopologyConfig.elWidths.length - 1] === 160) {
- serviceTopologyConfig.elWidths.pop();
- }
-
- //remove tags and ip
- delete _this.logicTopologyData.children[0].children[0].children[0].subscriberTag;
- delete _this.logicTopologyData.children[0].subscriberIP;
-
- _this.highlightInstances([]);
- delete _this.logicTopologyData.children[0].children[0].children[0].children[0].children;
- };
-
- this.getSubscriberTag = function (subscriber) {
- var tags = {
- cTag: subscriber.c_tag,
- sTag: subscriber.s_tag
- };
-
- _this.addSubscriberTag(tags);
- // add tags info to current subscriber
- _this.currentSubscriber.tags = tags;
- };
-
- this.getSubscriberIP = function (subscriber) {
- // const ip = JSON.parse(this.currentServiceChain.children[0].children[0].tenant.service_specific_attribute).wan_container_ip;
- // const ip = this.currentServiceChain.children[0].children[0].tenant.wan_container_ip;
- _this.logicTopologyData.children[0].subscriberIP = subscriber.wan_container_ip;
- };
-
- this.selectSubscriber = function (subscriber) {
- // append the device with to config settings
- serviceTopologyConfig.elWidths.push(160);
-
- _this.addSubscriber(angular.copy(subscriber));
-
- //clean selected instances
- _this.highlightInstances([]);
-
- _this.getSubscriberTag(subscriber);
- _this.getSubscriberIP(subscriber);
- };
-
- this.highlightInstances = function (instances) {
-
- var computeNodes = _this.logicTopologyData.children[0].children[0].computeNodes;
-
- // unselect all
- computeNodes.map(function (node) {
- node.instances.map(function (instance) {
- instance.selected = false;
- return instance;
- });
- });
-
- lodash.forEach(instances, function (instance) {
- computeNodes.map(function (node) {
- node.instances.map(function (d3instance) {
- if (d3instance.id === instance.id) {
- // console.log(d3instance, instance);
- d3instance.selected = true;
- d3instance.stats = instance.stats; //add stats to d3 node
- d3instance.container = instance.container; // container info to d3 node
- }
- return d3instance;
- });
- });
- });
- };
-
- this.getInstanceStatus = function (service) {
- var deferred = $q.defer();
-
- var p = undefined;
-
- // subscriber specific
- if (_this.currentSubscriber) {
-
- var attr = undefined;
- try {
- attr = JSON.parse(service.tenant.service_specific_attribute);
- } catch (e) {
- attr = null;
- }
-
- // if no instances are associated to the subscriber
- if (!attr || !attr.instance_id) {
- var d = $q.defer();
- d.resolve([]);
- p = d.promise;
- }
- // if ther is an instance
- else {
- (function () {
- var instance = {};
- p = Instances.get({ id: attr.instance_id }).$promise.then(function (_instance) {
- instance = _instance;
- return Ceilometer.getInstanceStats(instance.instance_uuid);
- }).then(function (stats) {
- instance.stats = stats;
- var containerName = 'vcpe-' + _this.currentSubscriber.tags.sTag + '-' + _this.currentSubscriber.tags.cTag;
- // append containers
- instance.container = {
- name: containerName
- };
-
- // TODO fetch container stats
- return Ceilometer.getContainerStats(containerName);
- }).then(function (containerStats) {
- instance.container.stats = containerStats.stats;
- instance.container.port = containerStats.port;
- return [instance];
- });
- })();
- }
- }
- // global scope
- else {
- var param = {
- 'service_vsg': { kind: 'vCPE' },
- 'service_vbng': { kind: 'vBNG' },
- 'service_volt': { kind: 'vOLT' }
- };
-
- p = Tenant.queryVsgInstances(param[service.name]).$promise.then(function (instances) {
- return Ceilometer.getInstancesStats(lodash.uniq(instances));
- });
- }
-
- p.then(function (instances) {
- _this.highlightInstances(instances);
- deferred.resolve(instances);
- })['catch'](function (e) {
- deferred.reject(e);
- });
-
- return deferred.promise;
- };
- }]);
-})();
-angular.module('xos.diagnostic').run(function($location){
- $location.path('/')
-});
-angular.bootstrap(angular.element('#xosDiagnostic'), ['xos.diagnostic']);
\ No newline at end of file
+"use strict";!function(){angular.module("xos.diagnostic",["ngResource","ngCookies","ngLodash","ngAnimate","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("home",{url:"/",template:"<diagnostic-container></diagnostic-container>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).run(["$log",function(e){e.info("Diagnostic Started")}])}(),angular.module("xos.diagnostic").run(["$templateCache",function(e){e.put("templates/diagnostic.tpl.html",'<div class="container-fluid">\n <div ng-hide="vm.error && vm.loader" style="height: 900px">\n <div class="onethird-height">\n <div class="well">\n Services Graph\n </div>\n <div class="well pull-right" ng-click="vm.reloadGlobalScope()" ng-show="vm.selectedSubscriber">\n Reset subscriber\n </div>\n <service-topology service-chain="vm.serviceChain"></service-topology>\n </div>\n <div class="twothird-height">\n <div class="well">\n Logical Resources\n </div>\n <logic-topology ng-if="vm.subscribers" subscribers="vm.subscribers" selected="vm.selectedSubscriber"></logic-topology>\n </div>\n </div>\n <div class="row" ng-if="vm.error">\n <div class="col-xs-12">\n <div class="alert alert-danger">\n {{vm.error}}\n </div>\n </div>\n </div>\n <div class="row" ng-if="vm.loader">\n <div class="col-xs-12">\n <div class="loader">Loading</div>\n </div>\n </div>\n</div>'),e.put("templates/logicTopology.tpl.html",'<select-subscriber-modal open="vm.openSelectSubscriberModal" subscribers="vm.subscribers"></select-subscriber-modal>\n<subscriber-status-modal open="vm.openSubscriberStatusModal" subscriber="vm.currentSubscriber"></subscriber-status-modal>\n<div class="alert alert-danger animate" ng-hide="!vm.error">\n {{vm.error}}\n</div>\n<!-- <div class="instances-stats animate" ng-hide="vm.hideInstanceStats">\n <div class="row">\n <div class="col-sm-3 col-sm-offset-8">\n <div class="panel panel-primary" ng-repeat="instance in vm.selectedInstances">\n <div class="panel-heading">\n {{instance.humanReadableName}}\n </div>\n <ul class="list-group">\n <li class="list-group-item">Backend Status: {{instance.backend_status}}</li>\n <li class="list-group-item">IP Address: {{instance.ip}}</li>\n </ul>\n <ul class="list-group">\n <li class="list-group-item" ng-repeat="stat in instance.stats">\n <span class="badge">{{stat.value}}</span>\n {{stat.meter}}\n </li>\n </ul>\n </div>\n </div> \n </div>\n </div>\n</div> -->'),e.put("templates/select-subscriber-modal.tpl.html",'<div class="modal fade" ng-class="{in: vm.open}" tabindex="-1" role="dialog">\n <div class="modal-dialog modal-sm">\n <div class="modal-content">\n <div class="modal-header">\n <button ng-click="vm.close()" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n <h4 class="modal-title">Select a subscriber:</h4>\n </div>\n <div class="modal-body">\n <select class="form-control" ng-options="s as s.humanReadableName for s in vm.subscribers" ng-model="vm.selected"></select>\n </div>\n <div class="modal-footer">\n <button ng-click="vm.close()" type="button" class="btn btn-default" data-dismiss="modal">Close</button>\n <button ng-click="vm.select(vm.selected)" type="button" class="btn btn-primary">Select</button>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->'),e.put("templates/subscriber-status-modal.tpl.html",'<div class="modal fade" ng-class="{in: vm.open}" tabindex="-1" role="dialog">\n <div class="modal-dialog modal-sm">\n <div class="modal-content">\n <div class="modal-header">\n <button ng-click="vm.close()" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n <h4 class="modal-title">Manage subscriber:</h4>\n </div>\n <form name="vm.subscriber-detail">\n <div class="modal-body">\n <div class="row">\n <div class="col-xs-12">\n <label>Status</label>\n </div>\n <div class="col-xs-6">\n <a ng-click="vm.subscriber.status = \'enabled\'"\n class="btn btn-block"\n ng-class="{\'btn-primary\': vm.subscriber.status === \'enabled\' ,\'btn-default\': vm.subscriber.status !== \'enabled\'}"\n >Enabled</a>\n </div>\n <div class="col-xs-6">\n <a ng-click="vm.subscriber.status = \'suspended\'"\n class="btn btn-block"\n ng-class="{\'btn-primary\': vm.subscriber.status === \'suspended\' ,\'btn-default\': vm.subscriber.status !== \'suspended\'}"\n >Suspended</a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-6">\n <a ng-click="vm.subscriber.status = \'delinquent\'"\n class="btn btn-block"\n ng-class="{\'btn-primary\': vm.subscriber.status === \'delinquent\' ,\'btn-default\': vm.subscriber.status !== \'delinquent\'}"\n >Delinquent <br> payment</a>\n </div>\n <div class="col-xs-6">\n <a ng-click="vm.subscriber.status = \'copyrightviolation\'"\n class="btn btn-block"\n ng-class="{\'btn-primary\': vm.subscriber.status === \'copyrightviolation\' ,\'btn-default\': vm.subscriber.status !== \'copyrightviolation\'}"\n >Copyright <br> violation</a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-6">\n <label>Uplink Speed</label>\n <div class="input-group">\n <input type="number" class="form-control small-padding" ng-model="vm.subscriber.uplink_speed"/>\n <span class="input-group-addon">Mbps</span>\n </div>\n </div>\n <div class="col-xs-6">\n <label>Downlink Speed</label>\n <div class="input-group">\n <input type="number" class="form-control small-padding" ng-model="vm.subscriber.downlink_speed"/>\n <span class="input-group-addon">Mbps</span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-6">\n <label>Enable Internet</label>\n </div>\n <div class="col-xs-6">\n <a \n ng-click="vm.subscriber.enable_uverse = !vm.subscriber.enable_uverse" \n ng-class="{\'btn-success\': vm.subscriber.enable_uverse, \'btn-danger\': !vm.subscriber.enable_uverse}"\n class="btn btn-block">\n <span ng-show="vm.subscriber.enable_uverse === true">Enabled</span>\n <span ng-show="vm.subscriber.enable_uverse !== true">Disabled</span>\n </a>\n </div>\n </div>\n </div>\n <div class="modal-footer" ng-show="vm.success || vm.formError">\n <div class="alert alert-success" ng-show="vm.success">\n {{vm.success}}\n </div>\n <div class="alert alert-danger" ng-show="vm.formError">\n {{vm.formError}}\n </div>\n </div>\n <div class="modal-footer">\n <button ng-click="vm.close()" type="button" class="btn btn-default" data-dismiss="modal">Close</button>\n <button ng-click="vm.updateSubscriber(vm.subscriber)" type="button" class="btn btn-primary">Save</button>\n </div>\n </form>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->')}]),function(){angular.module("xos.diagnostic").directive("selectSubscriberModal",function(){return{scope:{subscribers:"=",open:"="},bindToController:!0,restrict:"E",templateUrl:"templates/select-subscriber-modal.tpl.html",controllerAs:"vm",controller:["$rootScope",function(e){var t=this;this.close=function(){t.open=!1},this.select=function(n){e.$emit("subscriber.selected",n),t.close()}}]}}).directive("subscriberStatusModal",function(){return{scope:{open:"=",subscriber:"="},bindToController:!0,restrict:"E",templateUrl:"templates/subscriber-status-modal.tpl.html",controllerAs:"vm",controller:["$log","$timeout","$scope","Subscribers",function(e,t,n,r){var i=this,a=1e6;n.$watch(function(){return i.open},function(){i.success=null,i.formError=null}),n.$watch(function(){return i.subscriber},function(e,t){i.subscriber&&(console.log(e,t),console.log("subscriber change",e===t),i.subscriber.uplink_speed=parseInt(i.subscriber.uplink_speed,10)/a,i.subscriber.downlink_speed=parseInt(i.subscriber.downlink_speed,10)/a)}),this.close=function(){i.open=!1},this.updateSubscriber=function(e){var n=angular.copy(e,n);n.uplink_speed=n.uplink_speed*a,n.downlink_speed=n.downlink_speed*a,r.update(n).$promise.then(function(e){i.success="Subscriber successfully updated!"})["catch"](function(e){i.formError=e})["finally"](function(){t(function(){i.close()},1500)})}}]}})}(),function(){angular.module("xos.diagnostic").service("ServiceTopologyHelper",["$rootScope","$window","$log","lodash","ServiceRelation","serviceTopologyConfig","d3",function(e,t,n,r,i,a,s){var c,o,u,l,d=0,p=function(t,n,r){var p=arguments.length<=3||void 0===arguments[3]?l:arguments[3];p&&(l=p);var h=l.clientWidth-2*a.widthMargin;c=t,o=n,u=r;var m=i.depthOf(r),b=s.svg.diagonal().projection(function(e){return[e.y,e.x]}),g=n.nodes(r).reverse(),f=n.links(g);g.forEach(function(e){var t=(h-2*a.widthMargin)/(m-1);e.y=e.depth*t});var y=t.selectAll("g.node").data(g,function(e){return e.id||(e.id=++d)}),x=y.enter().append("g").attr({"class":function(e){return"node "+e.type},transform:function(e){return e.x&&e.y?"translate("+e.y+", "+e.x+")":"translate("+r.y0+", "+r.x0+")"}}),S=x.filter(".subscriber"),w=x.filter(".router"),T=x.filter(".service");S.append("rect").attr(a.square).on("click",function(){e.$emit("subscriber.modal.open")}),w.append("rect").attr(a.square),T.append("circle").attr("r",1e-6).style("fill",function(e){return e._children?"lightsteelblue":"#fff"}).on("click",v),x.append("text").attr({x:function(e){return e.children?-a.circle.selectedRadius-5:a.circle.selectedRadius+5},dy:".35em",y:function(e){return e.children&&e.parent?"-5":void 0},transform:function(e){return e.children&&e.parent?e.parent.x<e.x?"rotate(-30)":"rotate(30)":void 0},"text-anchor":function(e){return e.children?"end":"start"}}).text(function(e){return e.name}).style("fill-opacity",1e-6);var _=y.transition().duration(a.duration).attr({transform:function(e){return"translate("+e.y+","+e.x+")"}});_.select("circle").attr("r",function(e){return e.selected?a.circle.selectedRadius:a.circle.radius}).style("fill",function(e){return e.selected?"lightsteelblue":"#fff"}),_.select("text").style("fill-opacity",1);var C=y.exit().transition().duration(a.duration).remove();C.select("circle").attr("r",1e-6),C.select("text").style("fill-opacity",1e-6);var k=t.selectAll("path.link").data(f,function(e){return e.target.id});k.enter().insert("path","g").attr("class",function(e){return"link "+e.target.type+" "+(e.target.active?"":"active")}).attr("d",function(e){var t={x:r.x0,y:r.y0};return b({source:t,target:t})}),k.transition().duration(a.duration).attr("d",b),k.exit().transition().duration(a.duration).attr("d",function(e){var t={x:r.x,y:r.y};return b({source:t,target:t})}).remove(),g.forEach(function(e){e.x0=e.x,e.y0=e.y})},v=function(t){return t.selected?(t.selected=!t.selected,e.$emit("instance.detail.hide",{}),p(c,o,u)):(e.$emit("instance.detail",{name:t.name,service:t.service,tenant:t.tenant}),c.selectAll("circle").each(function(e){return e.selected=!1}),t.selected=!t.selected,void p(c,o,u))};this.updateTree=p}])}(),function(){angular.module("xos.diagnostic").directive("serviceTopology",function(){return{restrict:"E",scope:{serviceChain:"="},bindToController:!0,controllerAs:"vm",template:"",controller:["$element","$window","$scope","d3","serviceTopologyConfig","ServiceRelation","Slice","Instances","Subscribers","ServiceTopologyHelper",function(e,t,n,r,i,a,s,c,o,u){var l=this,d=e[0];r.select(window).on("resize.service",function(){h(l.serviceChain)});var p,v,h=function(t){if(!t)return void console.error("Tree is missing");r.select(e[0]).select("svg").remove();var n=d.clientWidth-2*i.widthMargin,a=d.clientHeight-2*i.heightMargin,s=r.layout.tree().size([a,n]);v=r.select(e[0]).append("svg").style("width",d.clientWidth+"px").style("height",d.clientHeight+"px");var c=v.append("g").attr("transform","translate("+2*i.widthMargin+","+i.heightMargin+")");p=t,p.x0=a/2,p.y0=n/2,u.updateTree(c,s,p,d)};n.$watch(function(){return l.serviceChain},function(e){angular.isDefined(e)&&h(e)})}]}})}(),function(){angular.module("xos.diagnostic").service("Services",["$resource",function(e){return e("/xos/services/:id",{id:"@id"})}]).service("Tenant",["$resource",function(e){return e("/xos/tenants",{id:"@id"},{queryVsgInstances:{method:"GET",isArray:!0,interceptor:{response:function(e){var t=[];return angular.forEach(e.data,function(e){var n=JSON.parse(e.service_specific_attribute);n&&n.instance_id&&t.push(n.instance_id)}),t}}},getSubscriberTag:{method:"GET",isArray:!0,interceptor:{response:function(e){return JSON.parse(e.data[0].service_specific_attribute)}}}})}]).service("Ceilometer",["$http","$q","Instances",function(e,t,n){var r=this;this.getInstanceStats=function(n){var r=t.defer();return e.get("/xoslib/xos-instance-statistics",{params:{"instance-uuid":n}}).then(function(e){r.resolve(e.data)})["catch"](function(e){r.reject(e)}),r.promise},this.getInstancesStats=function(e){var i=t.defer(),a=[],s=[];return e.forEach(function(e){a.push(n.get({id:e}).$promise)}),t.all(a).then(function(e){s=e;var n=[];return s.forEach(function(e){n.push(r.getInstanceStats(e.instance_uuid))}),t.all(n)}).then(function(e){s.map(function(t,n){t.stats=e[n]}),i.resolve(s)})["catch"](i.reject),i.promise},this.getContainerStats=function(n){var r=t.defer(),i={};return e.get("/xoslib/meterstatistics",{params:{resource:n}}).then(function(t){return i.stats=t.data,e.get("/xoslib/meterstatistics",{params:{resource:n+"-eth0"}})}).then(function(t){return i.port={eth0:t.data},e.get("/xoslib/meterstatistics",{params:{resource:n+"-eth1"}})}).then(function(e){i.port.eth1=e.data,r.resolve(i)})["catch"](function(e){r.reject(e)}),r.promise}}]).service("Slice",["$resource",function(e){return e("/xos/slices",{id:"@id"})}]).service("Instances",["$resource",function(e){return e("/xos/instances/:id",{id:"@id"})}]).service("Node",["$resource","$q","Instances",function(e,t,n){return e("/xos/nodes",{id:"@id"},{queryWithInstances:{method:"GET",isArray:!0,interceptor:{response:function(e){var r=t.defer(),i=[];return angular.forEach(e.data,function(e){i.push(n.query({node:e.id}).$promise)}),t.all(i).then(function(t){e.data.map(function(e,n){return e.instances=t[n],e}),r.resolve(e.data)}),r.promise}}}})}]).service("Subscribers",["$resource","$q","SubscriberDevice",function(e,t,n){return e("/xoslib/cordsubscriber/:id",{id:"@id"},{update:{method:"PUT",isArray:!1},queryWithDevices:{method:"GET",isArray:!0,interceptor:{response:function(e){var r=t.defer(),i=[];return angular.forEach(e.data,function(e){i.push(n.query({id:e.id}).$promise)}),t.all(i).then(function(t){e.data.map(function(e,n){return e.devices=t[n],e.type="subscriber",e.devices.map(function(e){return e.type="device"}),e}),r.resolve(e.data)}),r.promise}}},getWithDevices:{method:"GET",isArray:!1,interceptor:{response:function(e){var r=t.defer();return n.query({id:e.data.id}).$promise.then(function(t){t.map(function(e){return e.type="device"}),e.data.devices=t,e.data.type="subscriber",r.resolve(e.data)})["catch"](function(e){r.reject(e)}),r.promise}}}})}]).service("SubscriberDevice",["$resource",function(e){return e("/xoslib/rs/subscriber/:id/users/",{id:"@id"})}]).service("ServiceRelation",["$q","lodash","Services","Tenant","Slice","Instances",function(e,t,n,r,i,a){var s=function m(e){var t=0;return e.children&&e.children.forEach(function(e){var n=m(e);n>t&&(t=n)}),1+t},c=function(e,n){return t.filter(e,function(e){return e.subscriber_service===n})},o=function(e,n){var r,e=t.filter(e,function(e){return e.provider_service===n&&e.subscriber_tenant});return e.forEach(function(e){e.service_specific_attribute&&(r=JSON.parse(e.service_specific_attribute))}),r},u=function(e,n){var r=[];return t.forEach(e,function(e){var i=t.find(n,{id:e.provider_service});r.push(i)}),r},l=function b(e,n,r,i){var a=arguments.length<=4||void 0===arguments[4]?null:arguments[4],s=t.difference(n,[r]),l=c(e,r.id),d=u(l,n);s=t.difference(s,d),r.service_specific_attribute=o(e,r.id),"service_vbng"===r.humanReadableName&&(r.humanReadableName="service_vrouter");var p={name:r.humanReadableName,parent:a,type:"service",service:r,tenant:i,children:[]};return t.forEach(d,function(n){if("service_ONOS_vBNG"!==n.humanReadableName&&"service_ONOS_vOLT"!==n.humanReadableName){var a=t.find(e,{subscriber_tenant:i.id,provider_service:n.id});p.children.push(b(e,s,n,a,r.humanReadableName))}}),0===p.children.length&&p.children.push({name:"Router",type:"router",children:[]}),p},d=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{id:1,name:"fakeSubs"}:arguments[2],i=t.find(n,{subscriber_root:r.id}),a=t.find(e,{id:i.provider_service}),s=l(n,e,a,i);return{name:r.name||r.humanReadableName,parent:null,type:"subscriber",children:[s]}},p=function(e,n){var r=function s(e,n,r){"service_vbng"===r.humanReadableName&&(r.humanReadableName="service_vrouter");var i={type:"service",name:r.humanReadableName,service:r},a=t.find(n,{subscriber_service:r.id});if(a){var c=t.find(e,{id:a.provider_service});i.children=[s(e,n,c)]}else i.children=[{name:"Router",type:"router",children:[]}];return delete r.id,i},i=t.find(e,{id:3});if(!angular.isDefined(i))return void console.error("Missing Base service!");var a={name:"Subscriber",type:"subscriber",parent:null,children:[r(e,n,i)]};return a},v=function(t){var i,a,s=e.defer();return n.query().$promise.then(function(e){return i=e,r.query().$promise}).then(function(e){a=e,s.resolve(d(i,a,t))})["catch"](function(e){throw new Error(e)}),s.promise},h=function(){var t,i,a=e.defer();return n.query().$promise.then(function(e){return t=e,r.query({kind:"coarse"}).$promise}).then(function(e){i=e,a.resolve(p(t,i))})["catch"](function(e){throw new Error(e)}),a.promise};return{get:h,buildServiceTree:p,getBySubscriber:v,buildLevel:l,buildSubscriberServiceTree:d,findLevelRelation:c,findLevelServices:u,depthOf:s,findSpecificInformation:o}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(o){i=!0,a=o}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.diagnostic").service("RackHelper",["serviceTopologyConfig","lodash",function(e,t){var n=this;this.getComputeNodeLabelSize=function(){return e.computeNode.labelHeight+2*e.instance.margin},this.getComputeNodeSize=t.memoize(function(t){var r=3*e.instance.margin+2*e.instance.width,i=Math.round(t.length/2),a=n.getComputeNodeLabelSize(),s=e.instance.height*i+e.instance.margin*(i+1)+a;return[r,s]}),this.getRackSize=function(r){var i=0,a=e.computeNode.margin;return t.forEach(r,function(t){var r=n.getComputeNodeSize(t.instances),s=_slicedToArray(r,2),c=s[0],o=s[1];i=c+2*e.computeNode.margin,a+=o+e.computeNode.margin}),[i,a]},this.getInstancePosition=function(t){var r=Math.floor(t/2),i=t%2?1:0,a=n.getComputeNodeLabelSize(),s=e.instance.margin+e.instance.width*i+e.instance.margin*i,c=a+e.instance.margin+e.instance.height*r+e.instance.margin*r;return[s,c]},this.getComputeNodePosition=function(r,i){var a=e.computeNode.margin,s=t.reduce(r.slice(0,i),function(e,t){return e+n.getComputeNodeSize(t.instances)[1]},0),c=e.computeNode.margin+e.computeNode.margin*i+s;return[a,c]}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(o){i=!0,a=o}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){var e={cloud:" M 79.72 49.60 C 86.00 37.29 98.57 29.01 111.96 26.42 C 124.27 24.11 137.53 26.15 148.18 32.90 C 158.08 38.78 165.39 48.87 167.65 60.20 C 176.20 57.90 185.14 56.01 194.00 57.73 C 206.08 59.59 217.92 66.01 224.37 76.66 C 227.51 81.54 228.85 87.33 229.23 93.06 C 237.59 93.33 246.22 95.10 253.04 100.19 C 256.69 103.13 259.87 107.67 258.91 112.59 C 257.95 118.43 252.78 122.38 247.78 124.82 C 235.27 130.43 220.23 130.09 207.98 123.93 C 199.33 127.88 189.76 129.43 180.30 128.57 C 173.70 139.92 161.70 147.65 148.86 149.93 C 133.10 153.26 116.06 148.15 104.42 137.08 C 92.98 143.04 78.96 143.87 66.97 139.04 C 57.75 135.41 49.70 128.00 46.60 118.43 C 43.87 109.95 45.81 100.29 51.30 93.32 C 57.38 85.18 67.10 80.44 76.99 78.89 C 74.38 69.20 74.87 58.52 79.72 49.60 Z"},t=0,n=0;angular.module("xos.diagnostic").service("NodeDrawer",["d3","serviceTopologyConfig","RackHelper","lodash",function(r,i,a,s){var c=this,o=this;this.addNetworks=function(t){t.selectAll("*").remove(),t.append("path").attr({d:e.cloud,transform:"translate(-100, -72), scale(0.7)","class":"cloud"}),t.append("text").attr({"text-anchor":"middle",y:-5,x:5}).text(function(e){return e.name}),t.append("text").attr({"text-anchor":"middle",y:8,x:5,"class":"small"}).text(function(e){return e.subtitle}),t.each(function(e){var t=r.select(this);"LAN-Side"===e.name&&angular.isDefined(e.subscriberTag)&&(t.append("text").attr({"text-anchor":"middle",y:50}).text(function(){return"C-Tag: "+e.subscriberTag.cTag}),t.append("text").attr({"text-anchor":"middle",y:70}).text(function(){return"S-Tag: "+e.subscriberTag.sTag})),"WAN-Side"===e.name&&angular.isDefined(e.subscriberIP)&&t.append("text").attr({"text-anchor":"middle",y:50}).text(function(){return"Public IP: "+e.subscriberIP})})},this.addRack=function(e){e.each(function(t){var n=a.getRackSize(t.computeNodes),r=_slicedToArray(n,2),s=r[0],o=r[1];e.select("g").remove();var u=e.append("g");u.attr({transform:"translate(0,0)"}).transition().duration(i.duration).attr({transform:function(){return"translate("+-(s/2)+", "+-(o/2)+")"}}),u.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:s,height:o}),u.append("text").attr({"text-anchor":"middle",y:-10,x:s/2,opacity:0}).text(function(e){return e.name}).transition().duration(i.duration).attr({opacity:1}),c.drawComputeNodes(u,t.computeNodes)})},this.drawComputeNodes=function(e,n){var s=e.selectAll(".compute-nodes").data(n,function(e){return angular.isString(e.d3Id)||(e.d3Id="compute-node-"+ ++t),e.d3Id}),c=e.node().getBoundingClientRect(),u=c.width,l=c.height,d=s.enter().append("g");d.attr({transform:"translate("+u/2+", "+l/2+")","class":"compute-node"}).transition().duration(i.duration).attr({transform:function(e){return"translate("+a.getComputeNodePosition(n,e.d3Id.replace("compute-node-","")-1)+")"}}),d.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:function(e){return a.getComputeNodeSize(e.instances)[0]},height:function(e){return a.getComputeNodeSize(e.instances)[1]}}),d.append("text").attr({"text-anchor":"start",y:17,x:10,opacity:0}).text(function(e){return e.humanReadableName.split(".")[0]}).transition().duration(i.duration).attr({opacity:1}),d.length>0&&d.each(function(e){o.drawInstances(r.select(this),e.instances)})};var u=function(e){return e.replace("app_","").replace("service_","").replace("mysite_","").replace("_instance","")},l=function(e){function t(e,t){return t.substring(0,e.length)===e}return t("0 - ",e.backend_status)?"provisioning":t("1 - ",e.backend_status)?"good":t("2 - ",e.backend_status)?"bad":""},d=function(e,t){var n=e.append("g").attr({"class":"container",transform:"translate("+i.instance.margin+", 115)"});n.append("rect").attr({width:250-2*i.container.margin,height:i.container.height}),n.append("text").attr({y:20,x:i.instance.margin,"class":"name"}).text(t.name);var r=["memory","memory.usage","cpu_util"];r.forEach(function(e,r){var a=s.find(t.stats,{meter:e});angular.isDefined(a)&&n.append("text").attr({y:40+15*r,x:i.instance.margin,opacity:0}).text(a.description+": "+Math.round(a.value)+" "+a.unit).transition().duration(i.duration).attr({opacity:1})});var a=["eth0","eth1"],c=[{meter:"network.incoming.bytes.rate",label:"Incoming"},{meter:"network.outgoing.bytes.rate",label:"Outgoing"}];a.forEach(function(e,r){0!==t.port[e].length&&(n.append("text").attr({y:90,x:i.instance.margin+120*r,"class":"name"}).text(t.name+"-"+e),c.forEach(function(a,c){var o=s.find(t.port[e],{meter:a.meter});angular.isDefined(o)&&n.append("text").attr({y:105+15*c,x:i.instance.margin+120*r,opacity:0}).text(a.label+": "+Math.round(o.value)+" "+o.unit).transition().duration(i.duration).attr({opacity:1})}))})},p=function(e,t){var n={"mysite_vsg-1":"200, -120","mysite_vsg-2":"-300, 30","mysite_vsg-3":"-300, -250"},a=e.append("g").attr({transform:"translate("+(n[t.humanReadableName]||n["mysite_vsg-1"])+")","class":"stats-container"}).on("click",function(e){e.fade=!e.fade;var t=void 0;t=e.fade?.1:1,r.select(this).transition().duration(i.duration).attr({opacity:t})}),c={"mysite_vsg-1":{x1:-160,y1:120,x2:0,y2:50},"mysite_vsg-2":{x1:250,y1:50,x2:300,y2:-10},"mysite_vsg-3":{x1:250,y1:50,x2:300,y2:270}};a.append("line").attr({x1:function(e){return c[e.humanReadableName].x1||c["mysite_vsg-1"].x1},y1:function(e){return c[e.humanReadableName].y1||c["mysite_vsg-1"].y1},x2:function(e){return c[e.humanReadableName].x2||c["mysite_vsg-1"].x2},y2:function(e){return c[e.humanReadableName].y2||c["mysite_vsg-1"].y2},stroke:"black",opacity:0}).transition().duration(i.duration).attr({opacity:1});var o=110,u=250;t.container&&(o+=i.container.height+2*i.container.margin);a.append("rect").attr({width:u,height:o,opacity:0}).transition().duration(i.duration).attr({opacity:1});a.append("text").attr({y:15,x:i.instance.margin,"class":"name",opacity:0}).text(t.humanReadableName).transition().duration(i.duration).attr({opacity:1}),a.append("text").attr({y:30,x:i.instance.margin,"class":"ip",opacity:0}).text(t.ip).transition().duration(i.duration).attr({opacity:1});var l=["memory","memory.usage","cpu","cpu_util"];l.forEach(function(e,n){var r=s.find(t.stats,{meter:e});r&&a.append("text").attr({y:55+15*n,x:i.instance.margin,opacity:0}).text(r.description+": "+Math.round(r.value)+" "+r.unit).transition().duration(i.duration).attr({opacity:1})}),t.container&&d(a,t.container)};this.drawInstances=function(e,t){var s=e.node().getBoundingClientRect(),c=s.width,o=s.height,d=e.selectAll(".instances").data(t,function(e){return angular.isString(e.d3Id)?e.d3Id:e.d3Id="instance-"+ ++n}),v=d.enter().append("g");v.attr({transform:"translate("+c/2+", "+o/2+")","class":function(e){return"instance "+(e.selected?"active":"")+" "+l(e)}}).transition().duration(i.duration).attr({transform:function(e,t){return"translate("+a.getInstancePosition(t)+")"}}),v.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:i.instance.width,height:i.instance.height}),v.append("text").attr({"text-anchor":"middle",y:23,x:40,opacity:0}).text(function(e){return u(e.humanReadableName)}).transition().duration(i.duration).attr({opacity:1}),v.each(function(e,t){var n=r.select(this);angular.isDefined(e.stats)&&e.selected&&p(n,e,t)})},this.addPhisical=function(e){e.select("rect").remove(),e.select("text").remove(),e.append("rect").attr(i.square),e.append("text").attr({"text-anchor":"middle",y:i.square.y-10}).text(function(e){return e.name||e.humanReadableName})},this.addDevice=function(e){e.append("circle").attr(i.circle),e.append("text").attr({"text-anchor":"end",x:-i.circle.r-10,y:i.circle.r/2}).text(function(e){return e.name||e.mac})}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(o){i=!0,a=o}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.diagnostic").service("LogicTopologyHelper",["$window","$log","$rootScope","lodash","serviceTopologyConfig","NodeDrawer","ChartData",function(e,t,n,r,i,a,s){var c,o,u,l,d,p,v=this,h=0,m=s.logicTopologyData;this.computeElementPosition=function(e){var t=[],n=r.reduce(i.elWidths,function(e,t){return t+e},0),a=e-n-2*i.widthMargin,s=a/(i.elWidths.length-1);return r.forEach(i.elWidths,function(n,a){var c=0;0!==a&&(c=r.reduce(i.elWidths.slice(0,a),function(e,t){return t+e},0));var o=i.widthMargin+s*a+n/2+c;t.push(e-o)}),t};var b=function(e){var t=p.nodes(e);t.forEach(function(e){e.y=v.computeElementPosition(l)[e.depth]});var n=p.links(t);return[t,n]},g=function(e,t){var r=e.selectAll("g.node").data(t,function(e){return angular.isString(e.d3Id)||(e.d3Id="tree-"+ ++h),e.d3Id});r.enter().append("g").attr({"class":function(e){return"node "+e.type},transform:"translate("+l/2+", "+d/2+")"});a.addNetworks(r.filter(".network")),a.addRack(r.filter(".rack")),a.addPhisical(r.filter(".router")),a.addPhisical(r.filter(".subscriber")),a.addDevice(r.filter(".device")),r.filter(".subscriber").on("click",function(){n.$emit("subscriber.modal.open")});r.transition().duration(i.duration).attr({transform:function(e){return"translate("+e.y+","+e.x+")"}}),r.exit().remove()},f=function(e,t){c=d3.svg.diagonal().projection(function(e){return[e.y,e.x]});var n=e.selectAll("path.link").data(t,function(e){return e.target.d3Id});n.enter().insert("path","g").attr("class",function(e){return"link "+e.target.type}).attr("d",function(e){var t={x:d/2,y:l/2};return c({source:t,target:t})}),n.transition().duration(i.duration).attr("d",c),n.exit().remove()};this.setupTree=function(e){l=e.node().getBoundingClientRect().width,d=e.node().getBoundingClientRect().height;var t=l-2*i.widthMargin,n=d-2*i.heightMargin;p=d3.layout.tree().size([n,t])},this.updateTree=function(e){var t=b(m),n=_slicedToArray(t,2);o=n[0],u=n[1],g(e,o),f(e,u)}}])}(),function(){angular.module("xos.diagnostic").directive("logicTopology",function(){return{restrict:"E",scope:{subscribers:"=",selected:"="},bindToController:!0,controllerAs:"vm",templateUrl:"templates/logicTopology.tpl.html",controller:["$element","$log","$scope","$rootScope","$timeout","d3","LogicTopologyHelper","Node","Tenant","Ceilometer","serviceTopologyConfig","ChartData",function(e,t,n,r,i,a,s,c,o,u,l,d){var p=this;t.info("Logic Plane");var v;this.selectedInstances=[],this.hideInstanceStats=!0;var h=this,m=function(t){a.select(e[0]).select("svg").remove(),v=a.select(t).append("svg").style("width",t.clientWidth+"px").style("height",t.clientHeight+"px")},b=function(){d.getLogicTree().then(function(e){s.updateTree(v)})};b(),n.$watch(function(){return p.selected},function(e){e?(d.selectSubscriber(e),s.updateTree(v)):(d.removeSubscriber(),s.updateTree(v))}),r.$on("instance.detail.hide",function(){p.hideInstanceStats=!0,i(function(){p.selectedInstances=[],d.highlightInstances([]),s.updateTree(v)},500)}),r.$on("instance.detail",function(e,t){d.getInstanceStatus(t).then(function(e){s.updateTree(v)})["catch"](function(e){
+h.error="Service statistics are not available at this time. Please try again later.",i(function(){h.error=null},2e3)})}),a.select(window).on("resize.logic",function(){m(e[0]),s.setupTree(v),s.updateTree(v)}),m(e[0]),s.setupTree(v),this.selectSubscriberModal=function(){p.openSelectSubscriberModal=!0,n.$apply()},this.subscriberStatusModal=function(){p.openSubscriberStatusModal=!0,n.$apply()},r.$on("subscriber.modal.open",function(){d.currentSubscriber?p.subscriberStatusModal():p.selectSubscriberModal()}),r.$on("subscriber.modal.open",function(){d.currentSubscriber?(p.currentSubscriber=d.currentSubscriber,p.subscriberStatusModal()):p.selectSubscriberModal()})}]}})}(),function(){angular.module("xos.diagnostic").directive("diagnosticContainer",function(){return{restrict:"E",templateUrl:"templates/diagnostic.tpl.html",controllerAs:"vm",controller:["ChartData","Subscribers","ServiceRelation","$rootScope","$log",function(e,t,n,r,i){var a=this;this.loader=!0,this.error=!1;var s=function(){t.query().$promise.then(function(e){return a.subscribers=e,n.get()}).then(function(e){a.serviceChain=e})["catch"](function(e){throw new Error(e)})["finally"](function(){a.loader=!1})};s(),this.reloadGlobalScope=function(){a.selectedSubscriber=null,s()};var c=function(r){n.getBySubscriber(r).then(function(n){return a.serviceChain=n,e.currentServiceChain=n,t.getWithDevices({id:r.id}).$promise}).then(function(t){a.selectedSubscriber=t,e.currentSubscriber=t})};r.$on("subscriber.selected",function(e,t){c(t)})}]}})}(),function(){angular.module("xos.diagnostic").factory("d3",["$window",function(e){return e.d3}])}(),function(){angular.module("xos.diagnostic").constant("serviceTopologyConfig",{widthMargin:60,heightMargin:30,duration:750,elWidths:[20,104,105,104,20],circle:{radius:10,r:10,selectedRadius:15},square:{width:20,height:20,x:-10,y:-10},rack:{width:105,height:50,x:-30,y:-25},computeNode:{width:50,height:20,margin:5,labelHeight:10,x:-25,y:-10},instance:{width:80,height:36,margin:5,x:-40,y:-18},container:{width:60,height:130,margin:5,x:-30,y:-15}})}(),function(){angular.module("xos.diagnostic").service("ChartData",["$rootScope","$q","lodash","Tenant","Node","serviceTopologyConfig","Ceilometer","Instances",function(e,t,n,r,i,a,s,c){var o=this;this.currentSubscriber=null,this.currentServiceChain=null,this.logicTopologyData={name:"Router",type:"router",children:[{name:"WAN-Side",subtitle:"Virtual Network",type:"network",children:[{name:"Compute Servers",type:"rack",computeNodes:[],children:[{name:"LAN-Side",subtitle:"Virtual Network",type:"network",children:[{name:"Subscriber",type:"subscriber"}]}]}]}]},this.getLogicTree=function(){var e=t.defer();return i.queryWithInstances().$promise.then(function(t){o.logicTopologyData.children[0].children[0].computeNodes=t,e.resolve(o.logicTopologyData)}),e.promise},this.addSubscriberTag=function(e){o.logicTopologyData.children[0].children[0].children[0].subscriberTag={cTag:e.cTag,sTag:e.sTag}},this.addSubscriber=function(e){return e.children=e.devices,o.logicTopologyData.children[0].children[0].children[0].children=[e],o.logicTopologyData},this.removeSubscriber=function(){o.logicTopologyData.children[0].children[0].children[0].children[0].humanReadableName="Subscriber",o.currentSubscriber=null,160===a.elWidths[a.elWidths.length-1]&&a.elWidths.pop(),delete o.logicTopologyData.children[0].children[0].children[0].subscriberTag,delete o.logicTopologyData.children[0].subscriberIP,o.highlightInstances([]),delete o.logicTopologyData.children[0].children[0].children[0].children[0].children},this.getSubscriberTag=function(e){var t={cTag:e.c_tag,sTag:e.s_tag};o.addSubscriberTag(t),o.currentSubscriber.tags=t},this.getSubscriberIP=function(e){o.logicTopologyData.children[0].subscriberIP=e.wan_container_ip},this.selectSubscriber=function(e){a.elWidths.push(160),o.addSubscriber(angular.copy(e)),o.highlightInstances([]),o.getSubscriberTag(e),o.getSubscriberIP(e)},this.highlightInstances=function(e){var t=o.logicTopologyData.children[0].children[0].computeNodes;t.map(function(e){e.instances.map(function(e){return e.selected=!1,e})}),n.forEach(e,function(e){t.map(function(t){t.instances.map(function(t){return t.id===e.id&&(t.selected=!0,t.stats=e.stats,t.container=e.container),t})})})},this.getInstanceStatus=function(e){var i=t.defer(),a=void 0;if(o.currentSubscriber){var u=void 0;try{u=JSON.parse(e.tenant.service_specific_attribute)}catch(l){u=null}if(u&&u.instance_id)!function(){var e={};a=c.get({id:u.instance_id}).$promise.then(function(t){return e=t,s.getInstanceStats(e.instance_uuid)}).then(function(t){e.stats=t;var n="vcpe-"+o.currentSubscriber.tags.sTag+"-"+o.currentSubscriber.tags.cTag;return e.container={name:n},s.getContainerStats(n)}).then(function(t){return e.container.stats=t.stats,e.container.port=t.port,[e]})}();else{var d=t.defer();d.resolve([]),a=d.promise}}else{var p={service_vsg:{kind:"vCPE"},service_vbng:{kind:"vBNG"},service_volt:{kind:"vOLT"}};a=r.queryVsgInstances(p[e.name]).$promise.then(function(e){return s.getInstancesStats(n.uniq(e))})}return a.then(function(e){o.highlightInstances(e),i.resolve(e)})["catch"](function(e){i.reject(e)}),i.promise}}])}(),angular.module("xos.diagnostic").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosSampleView.js b/xos/core/xoslib/static/js/xosSampleView.js
index 69ec0bc..9c05349 100644
--- a/xos/core/xoslib/static/js/xosSampleView.js
+++ b/xos/core/xoslib/static/js/xosSampleView.js
@@ -1 +1 @@
-"use strict";angular.module("xos.sampleView",["ngResource","ngCookies","ngLodash","ui.router","xos.helpers"]).config(["$stateProvider",function(s){s.state("user-list",{url:"/",template:"<users-list></users-list>"})}]).config(["$httpProvider",function(s){s.interceptors.push("NoHyperlinks")}]).directive("usersList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/users-list.tpl.html",controller:["XosApi",function(s){var e=this;s.User_List_GET().then(function(s){e.users=s})["catch"](function(s){throw new Error(s)})}]}}),angular.module("xos.sampleView").run(["$templateCache",function(s){s.put("templates/users-list.tpl.html",'<div class="row">\n <h1>Users List</h1>\n <p>This is only an example view.</p>\n</div>\n<div class="row">\n <div class="span4">Email</div>\n <div class="span4">First Name</div>\n <div class="span4">Last Name</div>\n</div> \n<div class="row" ng-repeat="user in vm.users">\n <div class="span4">{{user.email}}</div>\n <div class="span4">{{user.firstname}}</div>\n <div class="span4">{{user.lastname}}</div>\n</div> ')}]),angular.bootstrap(angular.element("#xosSampleView"),["xos.sampleView"]);
\ No newline at end of file
+"use strict";angular.module("xos.sampleView",["ngResource","ngCookies","ngLodash","ui.router","xos.helpers"]).config(["$stateProvider",function(s){s.state("user-list",{url:"/",template:"<users-list></users-list>"})}]).config(["$httpProvider",function(s){s.interceptors.push("NoHyperlinks")}]).directive("usersList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/users-list.tpl.html",controller:["Users",function(s){var e=this;s.query().$promise.then(function(s){e.users=s})["catch"](function(s){throw new Error(s)})}]}}),angular.module("xos.sampleView").run(["$templateCache",function(s){s.put("templates/users-list.tpl.html",'<div class="row">\n <h1>Users List</h1>\n <p>This is only an example view.</p>\n</div>\n<div class="row">\n <div class="col-xs-4">Email</div>\n <div class="col-xs-4">First Name</div>\n <div class="col-xs-4">Last Name</div>\n</div> \n<div class="row" ng-repeat="user in vm.users">\n <div class="col-xs-4">{{user.email}}</div>\n <div class="col-xs-4">{{user.firstname}}</div>\n <div class="col-xs-4">{{user.lastname}}</div>\n</div> ')}]),angular.module("xos.sampleView").run(["$location",function(s){s.path("/")}]);
\ No newline at end of file
diff --git a/xos/templates/admin/base.html b/xos/templates/admin/base.html
index 3af6b33..b47bf74 100644
--- a/xos/templates/admin/base.html
+++ b/xos/templates/admin/base.html
@@ -39,7 +39,6 @@
<!-- ngXosLib -->
<script src="{% static 'js/vendor/ngXosVendor.js' %}"></script>
<script src="{% static 'js/vendor/ngXosHelpers.js' %}"></script>
- <script src="{% static 'js/xosApi.js' %}"></script>
<script type="text/javascript">var Suit = { $: $.noConflict() }; if (!$) $ = Suit.$; </script>
{% if 'SHOW_REQUIRED_ASTERISK'|suit_conf %}