Skip to content

Commit 6b1ea8c

Browse files
scoopexMarc Schöchlindependabot[bot]
authored
Better security handling (#28)
* Output passwords --------- Signed-off-by: Marc Schöchlin <[email protected]> Co-authored-by: Marc Schöchlin <[email protected]> Signed-off-by: Marc Schöchlin <[email protected]> * Add profiles from my coworkers Signed-off-by: Marc Schöchlin <[email protected]> * Use random passwords by default and output them Signed-off-by: Marc Schöchlin <[email protected]> * reformat Signed-off-by: Marc Schöchlin <[email protected]> * shorten line Signed-off-by: Marc Schöchlin <[email protected]> * Bump requests from 2.32.2 to 2.32.4 in the pip group across 1 directory (#27) Bumps the pip group with 1 update in the / directory: [requests](https://github.com/psf/requests). Updates `requests` from 2.32.2 to 2.32.4 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.2...v2.32.4) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.4 dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Schöchlin <[email protected]> Signed-off-by: Marc Schöchlin <[email protected]> * reformat Signed-off-by: Marc Schöchlin <[email protected]> * remove random logic Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> --------- Signed-off-by: Marc Schöchlin <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Marc Schöchlin <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 368e3ea commit 6b1ea8c

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

src/openstack_workload_generator/__main__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
from openstack.config import loader
1313

1414
from .entities import WorkloadGeneratorDomain
15-
from .entities.helpers import setup_logging, cloud_checker, item_checker, Config, iso_timestamp, deep_merge_dict
15+
from .entities.helpers import (
16+
setup_logging,
17+
cloud_checker,
18+
item_checker,
19+
Config,
20+
iso_timestamp,
21+
deep_merge_dict,
22+
)
1623

1724

1825
LOGGER = logging.getLogger()

src/openstack_workload_generator/entities/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
class Config:
1818
_config: dict[str, str | dict[str, str] | None] = {
19-
"admin_domain_password": "",
20-
"admin_vm_password": "",
19+
"admin_domain_password": "yolobanana",
20+
"admin_vm_password": "yolobanana",
2121
"admin_vm_ssh_key": "",
2222
"admin_vm_ssh_keypair_name": "my_ssh_public_key",
2323
"project_ipv4_subnet": "192.168.200.0/24",

src/openstack_workload_generator/entities/machine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def create_or_get_server(self, network: Network, wait_for_machine: bool):
101101
if self.obj:
102102
LOGGER.info(
103103
f"Created server {self.obj.name}/{self.obj.id} in {ProjectCache.ident_by_id(network.project_id)}"
104+
f" with password >>>{self.root_password}<<<"
104105
)
105106
else:
106107
raise RuntimeError(

src/openstack_workload_generator/entities/project.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ def assign_role_to_user_for_project(self, role_name: str, required=True):
141141
return
142142

143143
self._admin_conn.identity.assign_project_role_to_user(
144-
user=self.user.obj.id,
145-
project=self.obj.id,
146-
role=role_id
144+
user=self.user.obj.id, project=self.obj.id, role=role_id
147145
)
148146
LOGGER.info(
149147
f"Assigned {role_name} to {self.user.obj.id} for {ProjectCache.ident_by_id(self.obj.id)}"

src/openstack_workload_generator/entities/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def create_and_get_user(self) -> User:
5151
)
5252
self.assign_role_to_user("manager")
5353
LOGGER.info(
54-
f"Created user {self.obj.name} / {self.obj.id} with password {self.obj.password} in {DomainCache.ident_by_id(self.domain.id)}"
54+
f"Created user {self.obj.name} / {self.obj.id} with password >>>{self.obj.password}<<< "
55+
f"in {DomainCache.ident_by_id(self.domain.id)}"
5556
)
5657
return self.obj
5758

0 commit comments

Comments
 (0)