-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14867 from redpanda-data/cloudv2-14766-support-po…
…d-scaling rptest: Update decommission_and_add test for CloudV2 part 1
- Loading branch information
Showing
4 changed files
with
92 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class CloudBroker(): | ||
def __init__(self, pod, kubectl, logger) -> None: | ||
self.logger = logger | ||
# Validate | ||
if not isinstance(pod, dict) or pod['kind'] != 'Pod': | ||
self.logger.error("Invalid pod data provided") | ||
# Metadata | ||
self.operating_system = 'k8s' | ||
self._meta = pod['metadata'] | ||
self.name = self._meta['name'] | ||
self.slot_id = int( | ||
self._meta['labels']['operator.redpanda.com/node-id']) | ||
self.uuid = self._meta['uid'] | ||
|
||
# Save other data | ||
self._spec = pod['spec'] | ||
self._status = pod['status'] | ||
|
||
# save client | ||
self._kubeclient = kubectl | ||
|
||
# Backward compatibility | ||
self.account = self._meta | ||
|
||
# Backward compatibility | ||
def ssh_output(self, cmd): | ||
return self._kubeclient.exec(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters