diff --git a/nise/__init__.py b/nise/__init__.py index 023beaa0..9557e01a 100644 --- a/nise/__init__.py +++ b/nise/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.5.1" +__version__ = "4.5.2" VERSION = __version__.split(".") diff --git a/nise/generators/aws/ec2_generator.py b/nise/generators/aws/ec2_generator.py index a1a81927..16e0b618 100644 --- a/nise/generators/aws/ec2_generator.py +++ b/nise/generators/aws/ec2_generator.py @@ -97,11 +97,8 @@ class EC2Generator(AWSGenerator): def __init__(self, start_date, end_date, currency, payer_account, usage_accounts, attributes=None, tag_cols=None): """Initialize the EC2 generator.""" super().__init__(start_date, end_date, currency, payer_account, usage_accounts, attributes, tag_cols) - self._processor_arch = choice(self.ARCHS) - self._resource_id = "i-{}".format(self.fake.ean8()) - self._product_sku = self.fake.pystr(min_chars=12, max_chars=12).upper() self._instance_type = choice(self.INSTANCE_TYPES) - self._operating_system = choice(self.OPERATING_SYSTEMS) + self._operating_system = self.attributes.get("operating_system", choice(self.OPERATING_SYSTEMS)) self._processor_arch = self.attributes.get("processor_arch", choice(self.ARCHS)) self._resource_id = f"i-{self.attributes.get('resource_id', self.fake.ean8())}" self._product_sku = self.attributes.get("product_sku", self.fake.pystr(min_chars=12, max_chars=12).upper())