Commit 29e81f0e by Heechul Kim

clean up temp svc iface file

parent 1c769cee
...@@ -211,6 +211,13 @@ def provision_machine(name): ...@@ -211,6 +211,13 @@ def provision_machine(name):
if svc_iface_file: if svc_iface_file:
o_tar.add(svc_iface_file, arcname='svc-interface') o_tar.add(svc_iface_file, arcname='svc-interface')
# clean up svc_iface_file if exists.
if svc_iface_file:
try:
os.unlink(svc_iface_file)
except Exception as e:
log.error(e)
# finally update machine state = provisioned # finally update machine state = provisioned
update_machine(name, {'state': 'Provisioned'}) update_machine(name, {'state': 'Provisioned'})
......
...@@ -59,40 +59,84 @@ ...@@ -59,40 +59,84 @@
</div> </div>
<br><br> <br><br>
<div class="stacked-label"> <div class="stacked-label">
<label>MAC주소</label><p></p> <label>배포망 MAC주소</label><p></p>
<input <input
type="text" type="text"
v-model="form.mac" v-model="form.mac"
ref="mac" ref="mac"
class="full-width" class="full-width"
:class="{'has-error': $v.form.mac.$error}" :class="{'has-error': $v.form.mac.$error}"
placeholder="서버 MAC 주소를 입력하세요." placeholder="배포망 MAC 주소를 입력하세요."
> >
<span <span
class="text-negative" class="text-negative"
v-if="!$v.form.mac.required"> v-if="!$v.form.mac.required">
MAC 주소는 필수 입력 항목입니다. 배포망 MAC 주소는 필수 입력 항목입니다.
</span> </span>
</div> </div>
<br><br> <br><br>
<div class="stacked-label"> <div class="stacked-label">
<label>IP주소</label><p></p> <label>배포망 IP주소</label><p></p>
<input <input
type="text" type="text"
v-model="form.ip" v-model="form.ip"
ref="ip" ref="ip"
class="full-width" class="full-width"
:class="{'has-error': $v.form.ip.$error}" :class="{'has-error': $v.form.ip.$error}"
placeholder="서버 IP주소를 입력하세요." placeholder="배포망 IP주소를 입력하세요."
> >
<span <span
class="text-negative" class="text-negative"
v-if="!$v.form.ip.required"> v-if="!$v.form.ip.required">
IP 주소는 필수 입력 항목입니다. 배포망 IP 주소는 필수 입력 항목입니다.
</span> </span>
</div> </div>
<br><br> <br><br>
<div class="stacked-label"> <div class="stacked-label">
<label>서비스망 NIC</label>
<input
type="text"
v-model="form.svc_nic"
ref="svc_nic"
class="full-width"
placeholder="서비스망 NIC 장치명을 입력하세요."
>
</div>
<br><br>
<div class="stacked-label">
<label>서비스망 IP주소</label>
<input
type="text"
v-model="form.svc_ip"
ref="svc_ip"
class="full-width"
placeholder="서비스망 IP 주소를 입력하세요."
>
</div>
<br><br>
<div class="stacked-label">
<label>서비스망 Netmask</label>
<input
type="text"
v-model="form.svc_netmask"
ref="svc_netmask"
class="full-width"
placeholder="서비스망 Netmask를 입력하세요."
>
</div>
<br><br>
<div class="stacked-label">
<label>서비스망 Gateway</label>
<input
type="text"
v-model="form.svc_gateway"
ref="svc_gateway"
class="full-width"
placeholder="서비스망 Gateway를 입력하세요."
>
</div>
<br><br>
<div class="stacked-label">
<label>설명</label><p></p> <label>설명</label><p></p>
<input <input
type="text" type="text"
...@@ -128,6 +172,10 @@ export default { ...@@ -128,6 +172,10 @@ export default {
ipmi_ip: '', ipmi_ip: '',
mac: '', mac: '',
ip: '', ip: '',
svc_nic: '',
svc_ip: '',
svc_netmask: '',
svc_gateway: '',
desc: '' desc: ''
}, },
machineType: [ machineType: [
...@@ -160,6 +208,10 @@ export default { ...@@ -160,6 +208,10 @@ export default {
ipmi_ip: this.form.ipmi_ip, ipmi_ip: this.form.ipmi_ip,
mac: this.form.mac, mac: this.form.mac,
ip: this.form.ip, ip: this.form.ip,
svc_nic: this.form.svc_nic,
svc_ip: this.form.svc_ip,
svc_netmask: this.form.svc_netmask,
svc_gateway: this.form.svc_gateway,
desc: this.form.desc, desc: this.form.desc,
preseed: '' preseed: ''
} }
......
...@@ -108,6 +108,10 @@ export default { ...@@ -108,6 +108,10 @@ export default {
machine: '', machine: '',
consoleUrl: '', consoleUrl: '',
machines: [], machines: [],
machineType: [
{'label': 'PM', value: 'PM'},
{'label': 'VM', value: 'VM'}
],
config: { config: {
rowHeight: '10px', rowHeight: '10px',
title: '서버 목록', title: '서버 목록',
...@@ -250,6 +254,15 @@ export default { ...@@ -250,6 +254,15 @@ export default {
title: `서버: ${row.name}`, title: `서버: ${row.name}`,
message: '수정', message: '수정',
form: { form: {
header0: {
type: 'heading',
label: '종류'
},
type: {
type: 'radio',
model: row.type,
items: self.machineType
},
header1: { header1: {
type: 'heading', type: 'heading',
label: '운영체제' label: '운영체제'
...@@ -299,6 +312,26 @@ export default { ...@@ -299,6 +312,26 @@ export default {
label: 'IP 주소', label: 'IP 주소',
model: row.ip model: row.ip
}, },
svc_nic: {
type: 'textbox',
label: '서비스망 NIC',
model: row.svc_nic ? row.svc_nic : ''
},
svc_ip: {
type: 'textbox',
label: '서비스망 IP',
model: row.svc_ip ? row.svc_ip : ''
},
svc_netmask: {
type: 'textbox',
label: '서비스망 Netmask',
model: row.svc_netmask ? row.svc_netmask : ''
},
svc_gateway: {
type: 'textbox',
label: '서비스망 Gateway',
model: row.svc_gateway ? row.svc_gateway : ''
},
desc: { desc: {
type: 'textbox', type: 'textbox',
label: '설명', label: '설명',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment