Commit 7b0948ba authored by Jan Marchel's avatar Jan Marchel Committed by Marta Różańska
Browse files

Openstack deployment

parent 861ad9c2
......@@ -26,8 +26,7 @@
"src/styles.css",
"src/theme.scss"
],
"scripts": [],
"es5BrowserSupport": true
"scripts": []
},
"configurations": {
"production": {
......
This diff is collapsed.
......@@ -25,7 +25,9 @@
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"ng-block-ui": "^2.1.8",
"node-sass": "^4.14.1",
"rxjs": "~6.3.3",
"saas": "^1.0.0",
"tslib": "^1.14.1",
"zone.js": "~0.8.26"
},
......
......@@ -99,8 +99,7 @@ export class DeploymentService {
private mapCloudConfForReadToCloudConf(cloudConf: CloudConfigurationForRead): CloudConfiguration {
const chosenProperty = cloudConf.properties.filter(value => value.checked);
return new CloudConfiguration(cloudConf.nodeGroup, chosenProperty);
return new CloudConfiguration(cloudConf.nodeGroup, chosenProperty, cloudConf.scopePrefix, cloudConf.scopeValue, cloudConf.identityVersion);
}
}
......@@ -71,10 +71,14 @@
'visibility'}}
</mat-icon>
</mat-form-field>
<mat-form-field *ngIf="isOpenstack(apiForm)">
<input matInput formControlName="domain" placeholder="domain">
</mat-form-field>
</form>
</mat-card>
<mat-card>
<form [formGroup]="cloudConfigurationForm">
<mat-form-field>
......@@ -89,6 +93,19 @@
{{getNodeGroupPatternMsg()}}
</mat-error>
</mat-form-field>
<div *ngIf="isOpenstack(apiForm)">
<mat-form-field>
<input matInput formControlName="identityVersion" placeholder="identityVersion" >
</mat-form-field>
<mat-form-field>
<input matInput formControlName="scopePrefix" placeholder="scopePrefix" >
</mat-form-field>
<mat-form-field>
<input matInput formControlName="scopeValue" placeholder="scopeValue" >
</mat-form-field>
</div>
<mat-card-subtitle><h3>Cloud properties</h3></mat-card-subtitle>
......
......@@ -75,13 +75,19 @@ export class CloudDefinitionFormComponent implements OnInit {
[Validators.required])
: ['', [Validators.required]],
secret: this.cloudData ? new FormControl({value: this.cloudData.credential.secret, disabled: this.isReadMode})
: ['', Validators.required]
: ['', Validators.required],
domain: this.cloudData.credential.domain
});
this.cloudConfigurationForm = this.formBuilder.group({
id: this.cloudData ? this.cloudData.cloudConfiguration.id : null,
nodeGroup: this.cloudData ? new FormControl({value: this.cloudData.cloudConfiguration.nodeGroup, disabled: this.isReadMode})
: ['', [Validators.required, Validators.pattern(this.nodeGroupPattern)]],
properties: this.cloudData ? this.cloudData.cloudConfiguration.properties : this.cloudProperties
properties: this.cloudData ? this.cloudData.cloudConfiguration.properties : this.cloudProperties,
identityVersion: this.cloudData.cloudConfiguration.identityVersion,
scopePrefix: this.cloudData.cloudConfiguration.scopePrefix,
scopeValue: this.cloudData.cloudConfiguration.scopeValue
});
this.cloudDefinitionForm = this.formBuilder.group({
id: this.cloudData ? this.cloudData.id : null,
......@@ -204,6 +210,9 @@ export class CloudDefinitionFormComponent implements OnInit {
});
}
isOpenstack(apiForm: FormGroup) {
return apiForm.value.providerName === 'openstack';
}
private deleteCloudProperty(row: ParentProperty) {
const deletedPropertyId = this.cloudProperties.findIndex(value => value.id === row.id);
this.cloudProperties.splice(deletedPropertyId, 1);
......
......@@ -2,10 +2,18 @@ export class CloudConfiguration {
id?: number;
nodeGroup: string;
properties: {};
scopePrefix: string;
scopeValue: string;
identityVersion: string;
constructor(nodeGroupArg: string, propertiesArg: {}, idArg?: number) {
constructor(nodeGroupArg: string, propertiesArg: {}, scopePrefixArg: string,
scopeValueArg: string, identityVersionArg: string, idArg?: number) {
this.id = idArg;
this.nodeGroup = nodeGroupArg;
this.properties = propertiesArg;
this.scopePrefix = scopePrefixArg;
this.scopeValue = scopeValueArg;
this.identityVersion = identityVersionArg;
}
}
......@@ -2,4 +2,5 @@ export class Credential {
id?: number;
user: string;
secret: string;
domain: string;
}
......@@ -4,4 +4,7 @@ export class CloudConfigurationForRead {
id?: number;
nodeGroup: string;
properties: Array<ParentProperty>;
identityVersion: string;
scopePrefix: string;
scopeValue: string;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment