forked from QualiSystems/cloudshell-orch-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
…re/asynch-save
- Loading branch information
Showing
18 changed files
with
594 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
after_success: coveralls | ||
install: | ||
- pip install -r ./test_requirements.txt | ||
- pip install "cloudshell-core>=2.0.0,<2.1.0" | ||
- pip install "cloudshell-automation-api>=7.1,<7.3" | ||
- pip install "cloudshell-shell-core>=2.3.0,<2.4.0" | ||
- pip install pytest-cov | ||
language: python | ||
notifications: | ||
webhools: "https://qualisystemslab-cloudshell-orch-sandbox.getbadges.io/api/app/webhook/96453247-3989-49f9-a6c0-201036e14a70" | ||
python: | ||
- "2.7" | ||
script: | ||
py.test --cov=sandbox_scripts |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# cloudshell-orch-sandbox | ||
|
||
[![Coverage Status](https://coveralls.io/repos/github/QualiSystemsLab/cloudshell-orch-sandbox/badge.svg?branch=develop)](https://coveralls.io/github/QualiSystemsLab/cloudshell-orch-sandbox?branch=develop) [![Build Status](https://travis-ci.org/QualiSystemsLab/cloudshell-orch-sandbox.svg?branch=develop)](https://travis-ci.org/QualiSystemsLab/cloudshell-orch-sandbox) | ||
|
||
Package for sandbox orchestration script functions | ||
|
||
|
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,36 @@ | ||
#TODO: implement this file/move code from NetworkSaveNResource | ||
from sandbox_scripts.QualiEnvironmentUtils.StorageManager import StorageManager | ||
from sandbox_scripts.QualiEnvironmentUtils.QualiUtils import QualiError | ||
''' | ||
class SnapshotManager(object): | ||
def __init__(self, storage_client): | ||
self.storage_client = storage_client | ||
self.config_files_root = self.storage_client.get_configs_root() | ||
# ---------------------------------- | ||
# Is this Sandbox originates from a snapshot Blueprint? | ||
# ---------------------------------- | ||
def is_snapshot(self,fileName = " "): | ||
# check if there is a directory with the Blueprint's name under the snapshots dir | ||
if fileName != " ": | ||
env_dir = self.config_files_root + '/Snapshots/' + fileName | ||
else: | ||
env_dir = self.config_files_root + '/Snapshots/' + self.sandbox.Blueprint_name | ||
env_dir = env_dir.replace(' ', '_') | ||
return self.storage_client.dir_exist(env_dir) | ||
# ---------------------------------- | ||
# delete file name on storage | ||
# ---------------------------------- | ||
def delete_src_file(self,fileName): | ||
env_dir = self.config_files_root + '/Snapshots/' + fileName | ||
env_dir = env_dir.replace(' ', '_') | ||
self.storage_client.delete(env_dir) | ||
# ---------------------------------- | ||
def create_snapshot_dir(self,snapshot_name): | ||
env_dir = self.config_files_root + '/Snapshots/' + snapshot_name.strip() | ||
if not self.storage_client.dir_exist(env_dir): | ||
self.storage_client.create_dir(env_dir, write_to_output=True) | ||
''' |
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 @@ | ||
|
Oops, something went wrong.