Enumerations

module: rspub.core.rs_enum

class rspub.core.rs_enum.Strategy[source]

Bases: enum.Enum

Strategy for ResourceSync Publishing

resourcelist = 0

0 New resourcelist strategy

Create new resourcelist(s) every run.

new_changelist = 1

1 New changelist strategy

Create a new changelist every run. If no resourcelist was found in the metadata directory switch to new resourcelist strategy.

inc_changelist = 2

2 Incremental changelist strategy

Add changes to an existing changelist. If no changelist exists, create a new one. If no resourcelist was found in the metadata directory switch to new resourcelist strategy.

static names()[source]

Get Strategy names

Returns:List<str> of names
static sanitize(name)[source]

Verify a Strategy name

Parameters:name (str) – string to test
Returns:name if it is the name of a strategy
Raises:ValueError if the given name is not the name of a strategy
static strategy_for(value)[source]

Get a Strategy for the given value

Parameters:value – may be Strategy, str or int
Returns:Strategy
Raises:ValueError if the given value could not be converted to a Strategy
describe()[source]
class rspub.core.rs_enum.Capability[source]

Bases: enum.Enum

Capabilities as defined in the ResourceSync Framework

resourcelist = 0

0 resourcelist

changelist = 1

1 changelist

resourcedump = 2

2 resourcedump

changedump = 3

3 changedump

resourcedump_manifest = 4

4 resourcedump_manifest

changedump_manifest = 5

5 changedump_manifest

capabilitylist = 6

6 capabilitylist

description = 7

7 description

class rspub.core.rs_enum.SelectMode[source]

Bases: enum.Enum

Mode of selection

simple = 0
selector = 1
static names()[source]

Get SelectMode names

Returns:List<str> of names
static select_mode_for(mode)[source]