Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(cloud.logs): iceberg support (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdepaepe authored and jleveugle committed Apr 8, 2019
1 parent 3fa24ff commit f26304f
Show file tree
Hide file tree
Showing 34 changed files with 297 additions and 4 deletions.
14 changes: 14 additions & 0 deletions src/dbaas/logs/alert/alert.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsAlertIceberg", function (iceberg) {
"use strict";

var alertResource = iceberg("/dbaas/logs/:serviceName/output/graylog/stream/:streamId/alert/:alertId", {
serviceName: "@serviceName",
streamId: "@streamId",
alertId: "@alertId"
}, {
post: { method: "POST" },
put: { method: "PUT" }
});

return alertResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/alert/alert.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsAlert", function ($in
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsAlertV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsAlertIceberg");
}
};
});
18 changes: 18 additions & 0 deletions src/dbaas/logs/alias/alias.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsAliasIceberg", function (iceberg) {
"use strict";

// No cache here, because items can be shared at any moment by other users

var aliasResource = iceberg("/dbaas/logs/:serviceName/output/elasticsearch/alias/:aliasId", {
serviceName: "@serviceName"
}, {
create: { method: "POST" },
update: { method: "PUT" },
linkStream: { method: "POST", url: "/dbaas/logs/:serviceName/output/elasticsearch/alias/:aliasId/stream" },
unlinkStream: { method: "DELETE", url: "/dbaas/logs/:serviceName/output/elasticsearch/alias/:aliasId/stream/:streamId" },
linkIndex: { method: "POST", url: "/dbaas/logs/:serviceName/output/elasticsearch/alias/:aliasId/index" },
unlinkIndex: { method: "DELETE", url: "/dbaas/logs/:serviceName/output/elasticsearch/alias/:aliasId/index/:indexId" }
});

return aliasResource;
});
9 changes: 6 additions & 3 deletions src/dbaas/logs/alias/alias.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsAlias", function ($in
"use strict";

return {
Aapi: function () {
return $injector.get("OvhApiDbaasLogsAliasAapi");
},
v6: function () {
return $injector.get("OvhApiDbaasLogsAliasV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsAliasIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsAliasAapi");
}
};
});
14 changes: 14 additions & 0 deletions src/dbaas/logs/archives/archive.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsArchiveIceberg", function (iceberg) {
"use strict";

var archiveResource = iceberg("/dbaas/logs/:serviceName/output/graylog/stream/:streamId/archive/:archiveId", {
serviceName: "@serviceName",
streamId: "@streamId",
archiveId: "@archiveId",
expirationInSeconds: "@expirationInSeconds"
}, {
url: { method: "POST", url: "/dbaas/logs/:serviceName/output/graylog/stream/:streamId/archive/:archiveId/url" }
});

return archiveResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/archives/archive.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsArchive", function ($
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsArchiveV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsArchiveIceberg");
}
};
});
10 changes: 10 additions & 0 deletions src/dbaas/logs/cluster/cluster.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsClusterIceberg", function (iceberg) {
"use strict";

var clusterResource = iceberg("/dbaas/logs/:serviceName/cluster/:clusterId", {
serviceName: "@serviceName",
clusterId: "@clusterId"
});

return clusterResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/cluster/cluster.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsCluster", function ($
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsClusterV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsClusterIceberg");
}
};
});
14 changes: 14 additions & 0 deletions src/dbaas/logs/dashboard/dashboard.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsDashboardIceberg", function (iceberg) {
"use strict";

var dashboardResource = iceberg("/dbaas/logs/:serviceName/output/graylog/dashboard/:dashboardId", {
serviceName: "@serviceName",
dashboardId: "@dashboardId"
}, {
create: { method: "POST" },
update: { method: "PUT" },
duplicate: { method: "POST", url: "/dbaas/logs/:serviceName/output/graylog/dashboard/:dashboardId/duplicate" }
});

return dashboardResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/dashboard/dashboard.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsDashboard", function
v6: function () {
return $injector.get("OvhApiDbaasLogsDashboardV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsDashboardIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsDashboardAapi");
}
Expand Down
13 changes: 13 additions & 0 deletions src/dbaas/logs/elasticsearch/index/index.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsIndexIceberg", function (iceberg) {
"use strict";

var index = iceberg("/dbaas/logs/:serviceName/output/elasticsearch/index/:indexId", {
serviceName: "@serviceName",
indexId: "@indexId"
}, {
post: { method: "POST" },
put: { method: "PUT" }
});

return index;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/elasticsearch/index/index.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsIndex", function ($in
v6: function () {
return $injector.get("OvhApiDbaasLogsIndexV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsIndexIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsIndexAapi");
}
Expand Down
24 changes: 24 additions & 0 deletions src/dbaas/logs/input/input.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsInputIceberg", function (iceberg) {
"use strict";

var inputResource = iceberg("/dbaas/logs/:serviceName/input/:inputId", {
serviceName: "@serviceName",
inputId: "@inputId",
allowedNetworkId: "@allowedNetworkId"
}, {
create: { method: "POST" },
update: { method: "PUT" },
start: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/start" },
restart: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/restart" },
end: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/end" },
logurl: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/logs/url" },
test: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/configtest" },
testResult: { method: "GET", url: "/dbaas/logs/:serviceName/input/:inputId/configtest/result" },
updateLogstash: { method: "PUT", url: "/dbaas/logs/:serviceName/input/:inputId/configuration/logstash" },
updateFlowgger: { method: "PUT", url: "/dbaas/logs/:serviceName/input/:inputId/configuration/flowgger" },
trustNetwork: { method: "POST", url: "/dbaas/logs/:serviceName/input/:inputId/allowedNetwork" },
rejectNetwork: { method: "DELETE", url: "/dbaas/logs/:serviceName/input/:inputId/allowedNetwork/:allowedNetworkId" }
});

return inputResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/input/input.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsInput", function ($in
v6: function () {
return $injector.get("OvhApiDbaasLogsInputV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsInputIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsInputAapi");
}
Expand Down
9 changes: 9 additions & 0 deletions src/dbaas/logs/logs.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsIceberg", function (iceberg) {
"use strict";

var logsResource = iceberg("/dbaas/logs/:serviceName", {
serviceName: "@serviceName"
});

return logsResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/logs.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogs", function ($injecto
v6: function () {
return $injector.get("OvhApiDbaasLogsV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsAapi");
},
Expand Down
14 changes: 14 additions & 0 deletions src/dbaas/logs/offer/offer.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsOfferIceberg", function (iceberg) {
"use strict";

var offerResource = iceberg("/dbaas/logs/:serviceName/offer", {
serviceName: "@serviceName"
}, {
offerDetail: {
url: "/dbaas/logs/offer/:offerCode",
method: "GET"
}
});

return offerResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/offer/offer.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsOffer", function ($in
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsOfferV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsOfferIceberg");
}
};
});
9 changes: 9 additions & 0 deletions src/dbaas/logs/operation/operation.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsOperationIceberg", function (iceberg) {
"use strict";

var operationResource = iceberg("/dbaas/logs/:serviceName/operation/:operationId", {
serviceName: "@serviceName",
operationId: "@operationId"
});
return operationResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/operation/operation.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsOperation", function
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsOperationV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsOperationIceberg");
}
};
});
12 changes: 12 additions & 0 deletions src/dbaas/logs/option/option.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsOptionIceberg", function (iceberg) {
"use strict";

var optionResource = iceberg("/dbaas/logs/:serviceName/option/{optionId}", {
serviceName: "@serviceName",
optionId: "@optionId"
}, {
terminate: { method: "POST", url: "/dbaas/logs/:serviceName/option/:optionId/terminate" }
});

return optionResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/option/option.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsOption", function ($i
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsOptionV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsOptionIceberg");
}
};
});
16 changes: 16 additions & 0 deletions src/dbaas/logs/role/member/role-member.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsRoleMemberIceberg", function (iceberg) {
"use strict";

var memberResource = iceberg("/dbaas/logs/:serviceName/role/:roleId/member/:username", {
serviceName: "@serviceName",
roleId: "@roleId",
username: "@username"
}, {
query: { method: "GET", isArray: true },
create: { method: "POST", url: "/dbaas/logs/:serviceName/role/:roleId/member" },
update: { method: "PUT" },
remove: { method: "DELETE" }
});

return memberResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/role/member/role-member.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsRoleMember", function
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsRoleMemberV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsRoleMemberIceberg");
}
};
});
20 changes: 20 additions & 0 deletions src/dbaas/logs/role/permission/role-permission.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsRolePermissionIceberg", function (iceberg) {
"use strict";

var permissionResource = iceberg("/dbaas/logs/:serviceName/role/:roleId/permission/:permissionId", {
serviceName: "@serviceName",
roleId: "@roleId",
permissionId: "@permissionId"
}, {
query: { method: "GET", isArray: true },
getPermissionDetail: { method: "GET" },
addAlias: { method: "POST", url: "/dbaas/logs/:serviceName/role/:roleId/permission/alias" },
addIndex: { method: "POST", url: "/dbaas/logs/:serviceName/role/:roleId/permission/index" },
addDashboard: { method: "POST", url: "/dbaas/logs/:serviceName/role/:roleId/permission/dashboard" },
addStream: { method: "POST", url: "/dbaas/logs/:serviceName/role/:roleId/permission/stream" },
update: { method: "PUT" },
remove: { method: "DELETE" }
});

return permissionResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/role/permission/role-permission.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsRolePermission", func
return {
v6: function () {
return $injector.get("OvhApiDbaasLogsRolePermissionV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsRolePermissionIceberg");
}
};
});
14 changes: 14 additions & 0 deletions src/dbaas/logs/role/role.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsRoleIceberg", function (iceberg) {
"use strict";

var roleResource = iceberg("/dbaas/logs/:serviceName/role/:roleId", {
serviceName: "@serviceName",
roleId: "@roleId"
}, {
getDetail: { method: "GET" },
create: { method: "POST" },
update: { method: "PUT" }
});

return roleResource;
});
3 changes: 3 additions & 0 deletions src/dbaas/logs/role/role.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsRole", function ($inj
v6: function () {
return $injector.get("OvhApiDbaasLogsRoleV6");
},
Iceberg: function () {
return $injector.get("OvhApiDbaasLogsRoleIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsRoleAapi");
},
Expand Down
18 changes: 18 additions & 0 deletions src/dbaas/logs/stream/stream.iceberg.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
angular.module("ovh-api-services").service("OvhApiDbaasLogsStreamIceberg", function (iceberg) {
"use strict";

var streamResource = iceberg("/dbaas/logs/:serviceName/output/graylog/stream/:streamId", {
serviceName: "@serviceName",
streamId: "@streamId"
}, {
create: { method: "POST" },
update: { method: "PUT", url: "/dbaas/logs/:serviceName/output/graylog/stream/:streamId" },
notifications: {
method: "GET",
url: "/dbaas/logs/:serviceName/output/graylog/stream/:streamId/alert",
isArray: true
}
});

return streamResource;
});
4 changes: 3 additions & 1 deletion src/dbaas/logs/stream/stream.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ angular.module("ovh-api-services").service("OvhApiDbaasLogsStream", function ($i
v6: function () {
return $injector.get("OvhApiDbaasLogsStreamV6");
},

Iceberg: function () {
return $injector.get("OvhApiDbaasLogsStreamIceberg");
},
Aapi: function () {
return $injector.get("OvhApiDbaasLogsStreamAapi");
}
Expand Down
Loading

0 comments on commit f26304f

Please sign in to comment.