-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
1 deletion.
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,33 @@ | ||
class ProvisionBase(object): | ||
def __init__(self, data, step, instance_name=None): | ||
self.instance_name = instance_name or ''.join(random.choices(string.ascii_letters, k=16)) | ||
self.provision_dir = os.path.join(step.workdir, self.instance_name) | ||
|
||
def execute(self, command): | ||
""" executes one command in a gyes """ | ||
pass | ||
|
||
def sync_workdir_to_guest(self): | ||
""" sync step workdir from host to guests """ | ||
pass | ||
|
||
def sync_workdir_from_guest(self): | ||
""" sync step workdir from guest to host """ | ||
pass | ||
|
||
def provision(self): | ||
""" do the actual provisioning """ | ||
pass | ||
|
||
def load(self): | ||
""" load state from workdir """ | ||
pass | ||
|
||
def save(self): | ||
""" save state to workdir """ | ||
pass | ||
|
||
def destroy(self): | ||
""" destroy the machine """ | ||
pass | ||
|
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,11 @@ | ||
from click import echo | ||
|
||
from tmt.steps.provision.base import ProvisionBase | ||
|
||
|
||
class ProvisionLocalhost(ProvisionBase): | ||
def provision(self): | ||
echo ('provisioning localhost') | ||
|
||
def save(self): | ||
echo ('saving localhost') |