From: Dan Prince Date: Wed, 5 Sep 2012 17:20:54 +0000 (-0400) Subject: Remove null_kernel option. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e756bb932d3275e89ac24713e76464fd18da821b;p=openstack-build%2Fcinder-build.git Remove null_kernel option. This option was only used in the image/fake.py class. In this patch I've updated the fake to use an inline 'nokernel' string instead of this option which we don't make use of in the runtime Cinder code. Change-Id: I05d4f227f1278c827ace2ce3c62319f9b18d04d4 --- diff --git a/cinder/flags.py b/cinder/flags.py index d0056364c..c3dc34e38 100644 --- a/cinder/flags.py +++ b/cinder/flags.py @@ -151,10 +151,6 @@ global_opts = [ default=1000, help='the maximum number of items returned in a single ' 'response from a collection resource'), - cfg.StrOpt('null_kernel', - default='nokernel', - help='kernel image that indicates not to use a kernel, but to ' - 'use a raw disk image instead'), cfg.StrOpt('sqlite_db', default='cinder.sqlite', help='the filename to use with sqlite'), diff --git a/cinder/tests/image/fake.py b/cinder/tests/image/fake.py index 8e7d172cd..16c600e57 100644 --- a/cinder/tests/image/fake.py +++ b/cinder/tests/image/fake.py @@ -53,8 +53,8 @@ class _FakeImageService(object): 'is_public': False, 'container_format': 'raw', 'disk_format': 'raw', - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel, + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel', 'architecture': 'x86_64'}} image2 = {'id': 'a2459075-d96c-40d5-893e-577ff92e721c', @@ -67,8 +67,8 @@ class _FakeImageService(object): 'is_public': True, 'container_format': 'ami', 'disk_format': 'ami', - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel}} + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel'}} image3 = {'id': '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6', 'name': 'fakeimage123456', @@ -80,8 +80,8 @@ class _FakeImageService(object): 'is_public': True, 'container_format': None, 'disk_format': None, - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel}} + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel'}} image4 = {'id': 'cedef40a-ed67-4d10-800e-17455edce175', 'name': 'fakeimage123456', @@ -93,8 +93,8 @@ class _FakeImageService(object): 'is_public': True, 'container_format': 'ami', 'disk_format': 'ami', - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel}} + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel'}} image5 = {'id': 'c905cedb-7281-47e4-8a62-f26bc5fc4c77', 'name': 'fakeimage123456', @@ -120,8 +120,8 @@ class _FakeImageService(object): 'is_public': False, 'container_format': 'ova', 'disk_format': 'vhd', - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel, + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel', 'architecture': 'x86_64', 'auto_disk_config': 'False'}} @@ -135,8 +135,8 @@ class _FakeImageService(object): 'is_public': False, 'container_format': 'ova', 'disk_format': 'vhd', - 'properties': {'kernel_id': FLAGS.null_kernel, - 'ramdisk_id': FLAGS.null_kernel, + 'properties': {'kernel_id': 'nokernel', + 'ramdisk_id': 'nokernel', 'architecture': 'x86_64', 'auto_disk_config': 'True'}} diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 49ec258b3..809bf8c3f 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -109,10 +109,6 @@ #### (IntOpt) the maximum number of items returned in a single response #### from a collection resource -# null_kernel=nokernel -#### (StrOpt) kernel image that indicates not to use a kernel, but to use -#### a raw disk image instead - # sqlite_db=cinder.sqlite #### (StrOpt) the filename to use with sqlite @@ -494,4 +490,4 @@ #### (IntOpt) maximum number of volume gigabytes to allow per host -# Total option count: 131 +# Total option count: 130