1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-03 16:40:07 +02:00
copilot/portal-api/lib/data.js
2017-04-27 22:59:25 +01:00

87 lines
1.8 KiB
JavaScript

'use strict';
const Examples = require('./models/examples');
module.exports = class Data {
constructor (options) {
this._options = options;
}
createDeployment (deployment) {
return new Promise((resolve, reject) => {
resolve(Examples.deployment);
});
}
getDeployment (id) {
return new Promise((resolve, reject) => {
resolve(Examples.deployment);
});
}
updateDeployment (deployment) {
return new Promise((resolve, reject) => {
resolve(Examples.deployment);
});
}
deleteDeployment (id) {
return new Promise((resolve, reject) => {
resolve();
});
}
getDeployments () {
return new Promise((resolve, reject) => {
resolve(Examples.deployments);
});
}
getDatacenters () {
return new Promise((resolve, reject) => {
resolve(Examples.datacenters);
});
}
createManifest (deploymentId, manifest) {
return new Promise((resolve, reject) => {
resolve(Examples.manifest);
});
}
getManifest (deploymentId, revision) {
return new Promise((resolve, reject) => {
resolve(Examples.manifest);
});
}
getActivities (deploymentId) {
return new Promise((resolve, reject) => {
resolve(Examples.activities);
});
}
getMetrics (deploymentId) {
return new Promise((resolve, reject) => {
resolve(Examples.metrics);
});
}
getState (deploymentId) {
return new Promise((resolve, reject) => {
resolve(Examples.state);
});
}
updateState (deploymentId, action) {
return new Promise((resolve, reject) => {
resolve(Examples.state);
});
}
getServices (deploymentId) {
return new Promise((resolve, reject) => {
resolve(Examples.services);
});
}
updateService (deploymentId, service) {
return new Promise((resolve, reject) => {
resolve(Examples.service);
});
}
};