WIP: create new runtime-api

This commit is contained in:
Nick O'Leary
2018-04-15 11:18:10 +01:00
parent e8a637498d
commit e8e8f70c27
22 changed files with 1422 additions and 611 deletions

View File

@@ -107,6 +107,11 @@ function getSSHKey(username, name) {
function generateSSHKey(username, options) {
options = options || {};
var name = options.name || "";
if (!/^[a-zA-Z0-9\-_]+$/.test(options.name)) {
var err = new Error("Invalid SSH Key name");
e.code = "invalid_key_name";
return Promise.reject(err);
}
return checkExistSSHKeyFiles(username, name)
.then(function(result) {
if ( result ) {