Beispiel #1
0
class Element(Values):
    """
    XML calendar and contacts element names.
    """

    # Provisioning fields

    serviceNodeUID = ValueConstant(u"service-node")
    serviceNodeUID.fieldName = FieldName.serviceNodeUID

    loginAllowed = ValueConstant(u"login-allowed")
    loginAllowed.fieldName = FieldName.loginAllowed

    hasCalendars = ValueConstant(u"has-calendars")
    hasCalendars.fieldName = FieldName.hasCalendars

    hasContacts = ValueConstant(u"has-contacts")
    hasContacts.fieldName = FieldName.hasContacts

    # Auto-schedule fields

    autoScheduleMode = ValueConstant(u"auto-schedule-mode")
    autoScheduleMode.fieldName = FieldName.autoScheduleMode

    autoAcceptGroup = ValueConstant(u"auto-accept-group")
    autoAcceptGroup.fieldName = FieldName.autoAcceptGroup

    # Auto-schedule modes

    none = ValueConstant(u"none")
    none.constantValue = AutoScheduleMode.none

    accept = ValueConstant(u"accept")
    accept.constantValue = AutoScheduleMode.accept

    decline = ValueConstant(u"decline")
    decline.constantValue = AutoScheduleMode.decline

    acceptIfFree = ValueConstant(u"accept-if-free")
    acceptIfFree.constantValue = AutoScheduleMode.acceptIfFree

    declineIfBusy = ValueConstant(u"decline-if-busy")
    declineIfBusy.constantValue = AutoScheduleMode.declineIfBusy

    acceptIfFreeDeclineIfBusy = ValueConstant(
        u"accept-if-free-decline-if-busy")
    acceptIfFreeDeclineIfBusy.constantValue = (
        AutoScheduleMode.acceptIfFreeDeclineIfBusy)

    # For "locations", i.e., scheduled spaces:

    capacity = ValueConstant(u"capacity")
    capacity.fieldName = FieldName.capacity

    floor = ValueConstant(u"floor")
    floor.fieldName = FieldName.floor

    associatedAddress = ValueConstant(u"associated-address")
    associatedAddress.fieldName = FieldName.associatedAddress

    # For "addresses", i.e., non-scheduled areas containing locations:

    abbreviatedName = ValueConstant(u"abbreviated-name")
    abbreviatedName.fieldName = FieldName.abbreviatedName

    streetAddress = ValueConstant(u"street-address")
    streetAddress.fieldName = FieldName.streetAddress

    geographicLocation = ValueConstant(u"geographic-location")
    geographicLocation.fieldName = FieldName.geographicLocation
Beispiel #2
0
class WhoAttribute(Values):
    """
    Attributes needed internally that have no standard name.
    """
    generatedUUID = ValueConstant(u"entryUUID")
    objectClass = ValueConstant(u"objectClass")
Beispiel #3
0
class MoreStatuses(Values):
    MOOLAH = ValueConstant(402)

    @staticmethod
    def isError(status):
        return status.value < 400
Beispiel #4
0
class PACKAGE_NODE(PACKAGE):
    DESCRIPTION = ValueConstant(
        'Docker orchestration and volume management tool\n' + fill(
            'This meta-package contains links to the Flocker node '
            'utilities, and has only the dependencies required to run '
            'those tools', 79))
Beispiel #5
0
class RFC4524Attribute(Values):
    """
    COSINE and Internet X.500 attributes.

    See U{RFC 4524, section 2<http://tools.ietf.org/html/rfc4524#section-2>}.
    """
    associatedDomain = ValueConstant(u"associatedDomain")
    associatedName = ValueConstant(u"associatedName")
    buildingName = ValueConstant(u"buildingName")
    co = ValueConstant(u"co")  # Friendly country name
    documentAuthor = ValueConstant(u"documentAuthor")
    documentIdentifier = ValueConstant(u"documentIdentifier")
    documentLocation = ValueConstant(u"documentLocation")
    documentPublisher = ValueConstant(u"documentPublisher")
    documentTitle = ValueConstant(u"documentTitle")
    documentVersion = ValueConstant(u"documentVersion")
    drink = ValueConstant(u"drink")  # Favorite drink.  Seriously.
    homePhone = ValueConstant(u"homePhone")
    homePostalAddress = ValueConstant(u"homePostalAddress")
    host = ValueConstant(u"host")
    info = ValueConstant(u"info")
    mail = ValueConstant(u"mail")
    manager = ValueConstant(u"manager")
    mobile = ValueConstant(u"mobile")
    pager = ValueConstant(u"pager")
    personalTitle = ValueConstant(u"personalTitle")
    roomNumber = ValueConstant(u"roomNumber")
    secretary = ValueConstant(u"secretary")
    uniqueIdentifier = ValueConstant(u"uniqueIdentifier")
    userClass = ValueConstant(u"userClass")
Beispiel #6
0
class GCEDiskTypes(Values):
    SSD = ValueConstant(u"pd-ssd")
    STANDARD = ValueConstant(u"pd-standard")
Beispiel #7
0
class STATUSES(Values):
    """
    Closing status codes.

    @since: 13.2
    """

    NORMAL = ValueConstant(1000)
    GOING_AWAY = ValueConstant(1001)
    PROTOCOL_ERROR = ValueConstant(1002)
    UNSUPPORTED_DATA = ValueConstant(1003)
    NONE = ValueConstant(1005)
    ABNORMAL_CLOSE = ValueConstant(1006)
    INVALID_PAYLOAD = ValueConstant(1007)
    POLICY_VIOLATION = ValueConstant(1008)
    MESSAGE_TOO_BIG = ValueConstant(1009)
    MISSING_EXTENSIONS = ValueConstant(1010)
    INTERNAL_ERROR = ValueConstant(1011)
    TLS_HANDSHAKE_FAILED = ValueConstant(1056)
Beispiel #8
0
class RFC2307Attribute(Values):
    """
    Network Information Service attributes.

    See U{RFC 2307, section 2.2
    <http://tools.ietf.org/html/rfc2307#section-2.2>}.
    """
    uidNumber = ValueConstant(u"uidNumber")
    gidNumber = ValueConstant(u"gidNumber")
    gecos = ValueConstant(u"gecos")
    homeDirectory = ValueConstant(u"homeDirectory")
    loginShell = ValueConstant(u"loginShell")
    shadowLastChange = ValueConstant(u"shadowLastChange")
    shadowMin = ValueConstant(u"shadowMin")
    shadowMax = ValueConstant(u"shadowMax")
    shadowWarning = ValueConstant(u"shadowWarning")
    shadowInactive = ValueConstant(u"shadowInactive")
    shadowExpire = ValueConstant(u"shadowExpire")
    shadowFlag = ValueConstant(u"shadowFlag")
    memberUid = ValueConstant(u"memberUid")
    memberNisNetgroup = ValueConstant(u"memberNisNetgroup")
    nisNetgroupTriple = ValueConstant(u"nisNetgroupTriple")
    ipServicePort = ValueConstant(u"ipServicePort")
    ipServiceProtocol = ValueConstant(u"ipServiceProtocol")
    ipProtocolNumber = ValueConstant(u"ipProtocolNumber")
    oncRpcNumber = ValueConstant(u"oncRpcNumber")
    ipHostNumber = ValueConstant(u"ipHostNumber")
    ipNetworkNumber = ValueConstant(u"ipNetworkNumber")
    ipNetmaskNumber = ValueConstant(u"ipNetmaskNumber")
    macAddress = ValueConstant(u"macAddress")
    bootParameter = ValueConstant(u"bootParameter")
    bootFile = ValueConstant(u"bootFile")
    nisMapName = ValueConstant(u"nisMapName")
    nisMapEntry = ValueConstant(u"nisMapEntry")
Beispiel #9
0
class RFC2307ObjectClass(Values):
    """
    Network Information Service object classes.

    See U{RFC 2307, section 2.3
    <http://tools.ietf.org/html/rfc2307#section-2.3>}.
    """
    posixAccount = ValueConstant(u"posixAccount")
    shadowAccount = ValueConstant(u"shadowAccount")
    posixGroup = ValueConstant(u"posixGroup")
    ipService = ValueConstant(u"ipService")
    ipProtocol = ValueConstant(u"ipProtocol")
    oncRpc = ValueConstant(u"oncRpc")
    ipHost = ValueConstant(u"ipHost")
    ipNetwork = ValueConstant(u"ipNetwork")
    nisNetgroup = ValueConstant(u"nisNetgroup")
    nisMap = ValueConstant(u"nisMap")
    nisObject = ValueConstant(u"nisObject")
    ieee802Device = ValueConstant(u"ieee802Device")
    bootableDevice = ValueConstant(u"bootableDevice")
 class TRANSPORT_MESSAGE(Values):
     """
     Message types supported by an SSH transport.
     """
     KEX_DH_GEX_REQUEST_OLD = ValueConstant(30)
     KEXDH_INIT = ValueConstant(30)
Beispiel #11
0
class LDAPMatchFlags(Values):
    """
    LDAP match flags.
    """
    none = ValueConstant(u"")
    NOT = ValueConstant(u"!")
 class STATUS(Values):
     OK = ValueConstant("200")
     NOT_FOUND = ValueConstant("404")
Beispiel #13
0
class PACKAGE_PYTHON(PACKAGE):
    DESCRIPTION = ValueConstant(
        'Docker orchestration and volume management tool\n'
        + fill('This is the base package of scripts and libraries.', 79)
    )
Beispiel #14
0
class PackageTypes(Values):
    """
    Constants representing supported target packaging formats.
    """
    RPM = ValueConstant('rpm')
    DEB = ValueConstant('deb')
Beispiel #15
0
class Language(Values):
    """
    Some languages.
    """
    English = ValueConstant(u"en")
    Spanish = ValueConstant(u"sp")
Beispiel #16
0
class RFC4519Attribute(Values):
    """
    User application attributes.

    See U{RFC 4519, section 2<http://tools.ietf.org/html/rfc4519#section-2>}.
    """
    businessCategory = ValueConstant(u"businessCategory")
    c = ValueConstant(u"c")  # country name
    cn = ValueConstant(u"cn")  # common name
    dc = ValueConstant(u"dc")  # domain component
    description = ValueConstant(u"description")
    destinationIndicator = ValueConstant(u"destinationIndicator")
    distinguishedName = ValueConstant(u"distinguishedName")
    dnQualifier = ValueConstant(u"dnQualifier")
    enhancedSearchGuide = ValueConstant(u"enhancedSearchGuide")
    facsimileTelephoneNumber = ValueConstant(u"facsimileTelephoneNumber")
    generationQualifier = ValueConstant(u"generationQualifier")
    givenName = ValueConstant(u"givenName")
    houseIdentifier = ValueConstant(u"houseIdentifier")
    initials = ValueConstant(u"initials")
    internationalISDNNumber = ValueConstant(u"internationalISDNNumber")
    l = ValueConstant(u"l")  # locality name
    member = ValueConstant(u"member")
    name = ValueConstant(u"name")
    o = ValueConstant(u"o")  # organization name
    ou = ValueConstant(u"ou")  # organizational unit name
    owner = ValueConstant(u"owner")
    physicalDeliveryOfficeName = ValueConstant(u"physicalDeliveryOfficeName")
    postalAddress = ValueConstant(u"postalAddress")
    postalCode = ValueConstant(u"postalCode")
    postOfficeBox = ValueConstant(u"postOfficeBox")
    preferredDeliveryMethod = ValueConstant(u"preferredDeliveryMethod")
    registeredAddress = ValueConstant(u"registeredAddress")
    roleOccupant = ValueConstant(u"roleOccupant")
    searchGuide = ValueConstant(u"searchGuide")
    seeAlso = ValueConstant(u"seeAlso")
    serialNumber = ValueConstant(u"serialNumber")
    sn = ValueConstant(u"sn")  # surname
    st = ValueConstant(u"st")  # state or province name
    street = ValueConstant(u"street")
    telephoneNumber = ValueConstant(u"telephoneNumber")
    teletexTerminalIdentifier = ValueConstant(u"teletexTerminalIdentifier")
    telexNumber = ValueConstant(u"telexNumber")
    title = ValueConstant(u"title")
    uid = ValueConstant(u"uid")  # user id
    uniqueMember = ValueConstant(u"uniqueMember")
    userPassword = ValueConstant(u"userPassword")
    x121Address = ValueConstant(u"x121Address")
    x500UniqueIdentifier = ValueConstant(u"x500UniqueIdentifier")
Beispiel #17
0
class OtherLanguage(Values):
    """
    More languages.
    """
    French = ValueConstant(u"fr")
Beispiel #18
0
class RFC4519ObjectClass(Values):
    """
    User application object classes.

    See U{RFC 4519, section 3<http://tools.ietf.org/html/rfc4519#section-3>}.
    """
    applicationProcess = ValueConstant(u"applicationProcess")
    country = ValueConstant(u"country")
    dcObject = ValueConstant(u"dcObject")
    device = ValueConstant(u"device")
    groupOfNames = ValueConstant(u"groupOfNames")
    groupOfUniqueNames = ValueConstant(u"groupOfUniqueNames")
    locality = ValueConstant(u"locality")
    organization = ValueConstant(u"organization")
    organizationalPerson = ValueConstant(u"organizationalPerson")
    organizationalRole = ValueConstant(u"organizationalRole")
    organizationalUnit = ValueConstant(u"organizationalUnit")
    person = ValueConstant(u"person")
    residentialPerson = ValueConstant(u"residentialPerson")
    uidObject = ValueConstant(u"uidObject")
Beispiel #19
0
class GCEStorageProfiles(Values):
    GOLD = ValueConstant(GCEDiskTypes.SSD.value)
    SILVER = ValueConstant(GCEDiskTypes.SSD.value)
    BRONZE = ValueConstant(GCEDiskTypes.STANDARD.value)
Beispiel #20
0
class LDAPOperand(Values):
    """
    LDAP operands.
    """
    AND = ValueConstant(u"&")
    OR = ValueConstant(u"|")
Beispiel #21
0
class Element(Values):
    """
    XML element names.
    """

    # Booleans

    true = ValueConstant(u"true")
    false = ValueConstant(u"false")

    # Schema hierarchy

    directory = ValueConstant(u"directory")
    record = ValueConstant(u"record")

    # Field names

    uid = ValueConstant(u"uid")
    uid.fieldName = BaseFieldName.uid

    guid = ValueConstant(u"guid")
    guid.fieldName = BaseFieldName.guid

    shortName = ValueConstant(u"short-name")
    shortName.fieldName = BaseFieldName.shortNames

    fullName = ValueConstant(u"full-name")
    fullName.fieldName = BaseFieldName.fullNames

    emailAddress = ValueConstant(u"email")
    emailAddress.fieldName = BaseFieldName.emailAddresses

    password = ValueConstant(u"password")
    password.fieldName = BaseFieldName.password

    memberUID = ValueConstant(u"member-uid")
    memberUID.fieldName = IndexFieldName.memberUIDs
class ExitStatus(Values):
    """
    Exit status codes for system programs.
    """

    EX__BASE = 64

    EX_OK = ValueConstant(0)              # No error
    EX_USAGE = ValueConstant(EX__BASE)       # Command line usage error
    EX_DATAERR = ValueConstant(EX__BASE + 1)   # Invalid user data
    EX_NOINPUT = ValueConstant(EX__BASE + 2)   # Can't open input file
    EX_NOUSER = ValueConstant(EX__BASE + 3)   # Can't look up user
    EX_NOHOST = ValueConstant(EX__BASE + 4)   # Can't look up host
    EX_UNAVAILABLE = ValueConstant(EX__BASE + 5)   # Service unavailable
    EX_SOFTWARE = ValueConstant(EX__BASE + 6)   # Internal software error
    EX_OSERR = ValueConstant(EX__BASE + 7)   # System error
    EX_OSFILE = ValueConstant(EX__BASE + 8)   # System file missing
    EX_CANTCREAT = ValueConstant(EX__BASE + 9)   # Can't create output file
    EX_IOERR = ValueConstant(EX__BASE + 10)  # I/O error
    EX_TEMPFAIL = ValueConstant(EX__BASE + 11)  # Temporary failure
    EX_PROTOCOL = ValueConstant(EX__BASE + 12)  # Remote protocol error
    EX_NOPERM = ValueConstant(EX__BASE + 13)  # Permission denied
    EX_CONFIG = ValueConstant(EX__BASE + 14)  # Configuration error

    EX__MAX = EX_CONFIG.value