Feat: Docker images to glance
Change-Id: I8b061e1744c044f24e2704b7a241fc9ef1744c77
This commit is contained in:
parent
43e93feec4
commit
a8e7670082
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add docker images to Glance.
|
||||||
|
|
@ -86,6 +86,7 @@ export class CreateForm extends FormAction {
|
|||||||
uploadType: 'file',
|
uploadType: 'file',
|
||||||
hw_qemu_guest_agent: 'yes',
|
hw_qemu_guest_agent: 'yes',
|
||||||
usage_type: 'common',
|
usage_type: 'common',
|
||||||
|
container_format: 'bare',
|
||||||
visibility: this.isAdminPage ? 'public' : false,
|
visibility: this.isAdminPage ? 'public' : false,
|
||||||
hw_cpu_policy: NoSetValue,
|
hw_cpu_policy: NoSetValue,
|
||||||
hw_cpu_thread_policy: NoSetValue,
|
hw_cpu_thread_policy: NoSetValue,
|
||||||
@ -107,6 +108,19 @@ export class CreateForm extends FormAction {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get containerFormatList() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
value: 'bare',
|
||||||
|
label: 'Bare',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'docker',
|
||||||
|
label: 'Docker',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
get osList() {
|
get osList() {
|
||||||
return Object.keys(imageOS).map((key) => ({
|
return Object.keys(imageOS).map((key) => ({
|
||||||
value: key,
|
value: key,
|
||||||
@ -221,29 +235,44 @@ export class CreateForm extends FormAction {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'disk_format',
|
name: 'disk_format',
|
||||||
label: t('Format'),
|
label: t('Disk Format'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: this.formatList,
|
options: this.formatList,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'container_format',
|
||||||
|
label: t('Container Format'),
|
||||||
|
type: 'select',
|
||||||
|
options: this.containerFormatList,
|
||||||
|
onChange: (value) => {
|
||||||
|
this.setState({
|
||||||
|
isContainer: value === 'docker' ? true : false,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'os_distro',
|
name: 'os_distro',
|
||||||
label: t('OS'),
|
label: t('OS'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: this.osList,
|
options: this.osList,
|
||||||
required: true,
|
required: !this.state.isContainer,
|
||||||
|
hidden: this.state.isContainer,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'os_version',
|
name: 'os_version',
|
||||||
label: t('OS Version'),
|
label: t('OS Version'),
|
||||||
type: 'input',
|
type: 'input',
|
||||||
required: true,
|
hidden: this.state.isContainer,
|
||||||
|
required: !this.state.isContainer,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'os_admin_user',
|
name: 'os_admin_user',
|
||||||
label: t('OS Admin'),
|
label: t('OS Admin'),
|
||||||
type: 'input',
|
type: 'input',
|
||||||
required: true,
|
required: !this.state.isContainer,
|
||||||
|
hidden: this.state.isContainer,
|
||||||
extra: t(
|
extra: t(
|
||||||
'In general, administrator for Windows,root for Linux, please fill by image uploading.'
|
'In general, administrator for Windows,root for Linux, please fill by image uploading.'
|
||||||
),
|
),
|
||||||
@ -347,11 +376,12 @@ export class CreateForm extends FormAction {
|
|||||||
usage_type = 'common',
|
usage_type = 'common',
|
||||||
members,
|
members,
|
||||||
os_distro,
|
os_distro,
|
||||||
|
container_format = 'bare',
|
||||||
...rest
|
...rest
|
||||||
} = values;
|
} = values;
|
||||||
const body = {
|
const body = {
|
||||||
visibility: visibility || 'private',
|
visibility: visibility || 'private',
|
||||||
container_format: 'bare',
|
container_format,
|
||||||
usage_type,
|
usage_type,
|
||||||
os_distro,
|
os_distro,
|
||||||
...rest,
|
...rest,
|
||||||
|
Loading…
Reference in New Issue
Block a user