-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
2 changed files
with
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import nixops.statefile | ||
from nixops.storage import StorageArgDescriptions, StorageArgValues | ||
|
||
|
||
class MemoryBackend: | ||
@staticmethod | ||
def arguments() -> StorageArgDescriptions: | ||
raise NotImplementedError | ||
|
||
def __init__(self, args: StorageArgValues) -> None: | ||
pass | ||
|
||
# fetchToFile: acquire a lock and download the state file to | ||
# the local disk. Note: no arguments will be passed over kwargs. | ||
# Making it part of the type definition allows adding new | ||
# arguments later. | ||
def fetchToFile(self, path: str, **kwargs) -> None: | ||
pass | ||
|
||
def onOpen(self, sf: nixops.statefile.StateFile, **kwargs) -> None: | ||
sf.create_deployment() | ||
|
||
# uploadFromFile: upload the new state file and release any locks | ||
# Note: no arguments will be passed over kwargs. Making it part of | ||
# the type definition allows adding new arguments later. | ||
def uploadFromFile(self, path: str, **kwargs) -> None: | ||
pass |