mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 23:36:29 +00:00
Move kernel mapping out of run()
This commit is contained in:
parent
64045a2808
commit
554d99fc7f
1 changed files with 21 additions and 21 deletions
|
@ -40,9 +40,6 @@ class RegisterAMI(Task):
|
||||||
phase = phases.image_registration
|
phase = phases.image_registration
|
||||||
after = [CreateSnapshot]
|
after = [CreateSnapshot]
|
||||||
|
|
||||||
def run(self, info):
|
|
||||||
arch = {'i386': 'i386',
|
|
||||||
'amd64': 'x86_64'}.get(info.manifest.system['architecture'])
|
|
||||||
kernel_mapping = {'us-east-1': {'amd64': 'aki-88aa75e1',
|
kernel_mapping = {'us-east-1': {'amd64': 'aki-88aa75e1',
|
||||||
'i386': 'aki-b6aa75df'},
|
'i386': 'aki-b6aa75df'},
|
||||||
'us-west-1': {'amd64': 'aki-f77e26b2',
|
'us-west-1': {'amd64': 'aki-f77e26b2',
|
||||||
|
@ -61,7 +58,10 @@ class RegisterAMI(Task):
|
||||||
'i386': 'aki-ca8f51d7'},
|
'i386': 'aki-ca8f51d7'},
|
||||||
'us-gov-west-1': {'amd64': 'aki-79a4c05a',
|
'us-gov-west-1': {'amd64': 'aki-79a4c05a',
|
||||||
'i386': 'aki-7ba4c058'}}
|
'i386': 'aki-7ba4c058'}}
|
||||||
kernel_id = kernel_mapping.get(info.host['region']).get(info.manifest.system['architecture'])
|
|
||||||
|
def run(self, info):
|
||||||
|
arch = {'i386': 'i386', 'amd64': 'x86_64'}.get(info.manifest.system['architecture'])
|
||||||
|
kernel_id = self.kernel_mapping.get(info.host['region']).get(info.manifest.system['architecture'])
|
||||||
|
|
||||||
from boto.ec2.blockdevicemapping import BlockDeviceType
|
from boto.ec2.blockdevicemapping import BlockDeviceType
|
||||||
from boto.ec2.blockdevicemapping import BlockDeviceMapping
|
from boto.ec2.blockdevicemapping import BlockDeviceMapping
|
||||||
|
|
Loading…
Add table
Reference in a new issue