Skip to content

Commit

Permalink
Adding multiple packages, installed_packages instead of just 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajaditya Chauhan authored and jhutar committed Feb 29, 2024
1 parent 9e3858e commit 5666510
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions opl/generators/inventory_ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def _mid(self, data):
return data["subscription_manager_id"]

def _data(self):

packages_generated = self.pg.generate(self.packages)
data = {
"inventory_id": self._get_uuid(),
"subscription_manager_id": self._get_uuid(),
Expand All @@ -92,17 +94,7 @@ def _data(self):
]
),
"operating_system": json.dumps(self._get_operating_system()),
"installed_packages": json.dumps(
[
random.choice(
[
"krb5-libs-0:-1.16.1-23.fc29.i686",
"arb5-libs-0:-1.16.1-23.fc29.i686",
"brb5-libs-0:-1.16.1-23.fc29.i686",
]
)
]
),
"installed_packages": json.dumps(packages_generated),
"tuned_profile": random.choice(["desktop", "example", "laptop"]),
"selinux_current_mode": random.choice(
["enforcing", "permissive", "disabled"]
Expand Down Expand Up @@ -152,7 +144,7 @@ def _data(self):
"fqdn": self._get_hostname(),
"nowz": self._get_now_iso_z(), # well, this is in nano-seconds, but should be in mili-seconds
"tommorowz": self._get_tommorow_iso_z(),
"packages": self.pg.generate(self.packages),
"packages": packages_generated,
"yum_repos": opl.generators.packages.YumReposGenerator().generate(137),
"enabled_services": opl.generators.packages.EnabledServicesGenerator().generate(
139
Expand Down

0 comments on commit 5666510

Please sign in to comment.