Skip to content

Commit

Permalink
[COST-4953] Specify operating system for testing purposes. (#507)
Browse files Browse the repository at this point in the history
* feat: specify operating system for testing purposes.
  • Loading branch information
bacciotti committed May 22, 2024
1 parent 3ab9130 commit 0b88a23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "4.5.1"
__version__ = "4.5.2"

VERSION = __version__.split(".")
5 changes: 1 addition & 4 deletions nise/generators/aws/ec2_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 0b88a23

Please sign in to comment.