Makes ironic build reproducible
This changes the samples for port, volume_connector, and volume_target so that the updated_at and created_at values are constant times, similar to the node and chassis. This patch makes the build of Ironic reproducible. If you don't know about reproducible build, please read on: https://wiki.debian.org/ReproducibleBuilds https://wiki.debian.org/ReproducibleBuilds/About Debian has SOURCE_DATE_EPOCH set according to the last date of debian/changelog, which makes it so that the time is constant, and the build becomes reproducible. Change-Id: I302609bf53659e33e89cae223336a453052a5745 Co-Authored-By: Ruby Loo <ruby.loo@intel.com>
This commit is contained in:
parent
fbc57abb17
commit
57bba84316
|
@ -221,12 +221,13 @@ class Port(base.APIBase):
|
|||
|
||||
@classmethod
|
||||
def sample(cls, expand=True):
|
||||
time = datetime.datetime(2000, 1, 1, 12, 0, 0)
|
||||
sample = cls(uuid='27e3153e-d5bf-4b7e-b517-fb518e17f34c',
|
||||
address='fe:54:00:77:07:d9',
|
||||
extra={'foo': 'bar'},
|
||||
internal_info={},
|
||||
created_at=datetime.datetime.utcnow(),
|
||||
updated_at=datetime.datetime.utcnow(),
|
||||
created_at=time,
|
||||
updated_at=time,
|
||||
pxe_enabled=True,
|
||||
local_link_connection={
|
||||
'switch_info': 'host', 'port_id': 'Gig0/1',
|
||||
|
|
|
@ -149,12 +149,13 @@ class VolumeConnector(base.APIBase):
|
|||
|
||||
@classmethod
|
||||
def sample(cls, expand=True):
|
||||
time = datetime.datetime(2000, 1, 1, 12, 0, 0)
|
||||
sample = cls(uuid='86cfd480-0842-4abb-8386-e46149beb82f',
|
||||
type='iqn',
|
||||
connector_id='iqn.2010-10.org.openstack:51332b70524',
|
||||
extra={'foo': 'bar'},
|
||||
created_at=datetime.datetime.utcnow(),
|
||||
updated_at=datetime.datetime.utcnow())
|
||||
created_at=time,
|
||||
updated_at=time)
|
||||
sample._node_uuid = '7ae81bb3-dec3-4289-8d6c-da80bd8001ae'
|
||||
fields = None if expand else _DEFAULT_RETURN_FIELDS
|
||||
return cls._convert_with_links(sample, 'http://localhost:6385',
|
||||
|
|
|
@ -156,6 +156,7 @@ class VolumeTarget(base.APIBase):
|
|||
|
||||
@classmethod
|
||||
def sample(cls, expand=True):
|
||||
time = datetime.datetime(2000, 1, 1, 12, 0, 0)
|
||||
properties = {"auth_method": "CHAP",
|
||||
"auth_username": "XXX",
|
||||
"auth_password": "XXX",
|
||||
|
@ -171,8 +172,8 @@ class VolumeTarget(base.APIBase):
|
|||
volume_id='a2f3ff15-b3ea-4656-ab90-acbaa1a07607',
|
||||
properties=properties,
|
||||
extra={'foo': 'bar'},
|
||||
created_at=datetime.datetime.utcnow(),
|
||||
updated_at=datetime.datetime.utcnow())
|
||||
created_at=time,
|
||||
updated_at=time)
|
||||
sample._node_uuid = '7ae81bb3-dec3-4289-8d6c-da80bd8001ae'
|
||||
fields = None if expand else _DEFAULT_RETURN_FIELDS
|
||||
return cls._convert_with_links(sample, 'http://localhost:6385',
|
||||
|
|
Loading…
Reference in New Issue