rattail.sw.locms.deploy

rattail.sw.locsms.deploy – Deployment Interface

This module attempts to simplify deployment of “hotfixes” (in the form of commands, support files, and data) and samples, etc., to various nodes within SMS “environments” (be they development or production).

rattail.sw.locsms.deploy.flip_archive_bit(path)

Turns off the “File is ready for archiving” bit on file specified by path.

rattail.sw.locsms.deploy.get_node(key=None)

Constructs a Node instance and returns it. The path to the node’s Storeman folder is required and must be present in config. key is used to distinguish in case you have more than one node configured:

[rattail.sw.locsms]
node = C:\Storeman
node.testlane = \TESTLANE\Storeman

Those two nodes could be retrieved with the following calls:

node = get_node()
node = get_node('testlane')
class rattail.sw.locsms.deploy.Environment(uuid=None, **kwargs)

Represents a SMS “environment” corresponding to an arbitrary system, be it development, testing, production or otherwise. This is meant to reflect real-world use cases and system administration workflows, and is used to organize deployment configuration etc.

class rattail.sw.locsms.deploy.HotfixEnvironment(*args, **kwargs)

Contains settings for deploying a hotfix(es), specific to an environment.

class rattail.sw.locsms.deploy.HotfixFile(**kwargs)

Represents a local file intended to be deployed as part of a hotfix.

class rattail.sw.locsms.deploy.Node(**kwargs)

Represents a node belonging to a rattail.sw.locsms.deploy.Environment instance.

deploy_to_inbox(path)

Copies file from path to the node’s inbox folder, and turns off the new file’s archive bit.

get_inbox_path(filename=None)

Returns the full path to the node’s “inbox” folder.

name

Returns the node’s “name” in STORE:TER format.

class rattail.sw.locsms.deploy.SamplesEnvironment(*args, **kwargs)

Contains settings for deploying samples, specific to an environment.

Target Folders

The following functions can be used to locate a full target path. The function signatures intentionally match, to accommodate the mapping used by TARGET_DIRS.

Todo

This whole concept probably already needs some refactoring...

rattail.sw.locsms.deploy.get_inbox_path(node, path=None)

Returns the full path to the “inbox” folder for the given rattail.sw.locsms.deploy.Node instance. path is accepted for compatibility’s sake but is ignored.

rattail.sw.locsms.deploy.get_root_path(node, path)

Returns a fully-qualified version of path, relative to the root of the given rattail.sw.locsms.deploy.Node instance.

rattail.sw.locsms.deploy.get_office_path(node, path)

Returns a fully-qualified version of path, relative to the given rattail.sw.locsms.deploy.Node‘s Office folder.

rattail.sw.locsms.deploy.get_target_path(node, target_dir)

Returns an appropriate fully-qualified path according to the mappings found in TARGET_DIRS.

And for convenience:

rattail.sw.locsms.deploy.TARGET_DIRS

A dictionary which, for each supported target folder, maps a human-readable name to the appropriate get_*_path() function (see above).

Table Of Contents

Previous topic

rattail.sw.locms.conf

Next topic

rattail.sw.locms.fields

This Page