Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(moniker) - updating server group writer/operations to pass moniker params to gate/orca #4185

Merged
merged 2 commits into from
Sep 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Application } from 'core/application/application.model';
import { ISecurityGroup, IServerGroup, ITask } from 'core/domain';
import { IServerGroupCommand } from './configure/common/serverGroupCommandBuilder.service';
import { NAMING_SERVICE, NamingService } from 'core/naming/naming.service';
import { IMoniker } from 'core/naming/IMoniker';
import { IJob, TASK_EXECUTOR, TaskExecutor } from 'core/task/taskExecutor';

export interface ICapacity {
Expand All @@ -22,6 +23,7 @@ export interface IServerGroupJob extends IJob {
securityGroups?: string[];
serverGroupName?: string;
type?: string;
moniker?: IMoniker;
}

export class ServerGroupWriter {
Expand Down Expand Up @@ -60,6 +62,7 @@ export class ServerGroupWriter {
params: IServerGroupJob = {}): ng.IPromise<ITask> {

params.asgName = serverGroup.name;
params.moniker = serverGroup.moniker;
params.serverGroupName = serverGroup.name;
params.type = 'destroyServerGroup';
params.region = serverGroup.region;
Expand All @@ -79,6 +82,7 @@ export class ServerGroupWriter {

params.asgName = serverGroup.name;
params.serverGroupName = serverGroup.name;
params.moniker = serverGroup.moniker;
params.type = 'disableServerGroup';
params.region = serverGroup.region;
params.credentials = serverGroup.account;
Expand All @@ -97,6 +101,7 @@ export class ServerGroupWriter {

params.asgName = serverGroup.name;
params.serverGroupName = serverGroup.name;
params.moniker = serverGroup.moniker;
params.type = 'enableServerGroup';
params.region = serverGroup.region;
params.credentials = serverGroup.account;
Expand All @@ -115,6 +120,7 @@ export class ServerGroupWriter {

params.asgName = serverGroup.name;
params.serverGroupName = serverGroup.name;
params.moniker = serverGroup.moniker;
params.type = 'resizeServerGroup';
params.region = serverGroup.region;
params.credentials = serverGroup.account;
Expand All @@ -132,6 +138,7 @@ export class ServerGroupWriter {
params: IServerGroupJob = {}): ng.IPromise<ITask> {

params.type = 'rollbackServerGroup';
params.moniker = serverGroup.moniker;
params.region = serverGroup.region;
params.credentials = serverGroup.account;
params.cloudProvider = serverGroup.type || serverGroup.provider;
Expand All @@ -149,6 +156,7 @@ export class ServerGroupWriter {

const job: IServerGroupJob = {
amiName: serverGroup.launchConfig.imageId,
moniker: serverGroup.moniker,
cloudProvider: serverGroup.type || serverGroup.provider,
credentials: serverGroup.account,
region: serverGroup.region,
Expand Down