Beispiel #1
0
# New in 2.0
SECURITY.APIKEY_CREATE = b'12000'
SECURITY.APIKEY_EDIT = b'12001'
SECURITY.APIKEY_DELETE = b'12002'
SECURITY.APIKEY_CHANGE_PASSWORD = b'12003'

# New in 2.0
SECURITY.XPATH_SEC_CREATE = b'12100'
SECURITY.XPATH_SEC_EDIT = b'12101'
SECURITY.XPATH_SEC_DELETE = b'12102'
SECURITY.XPATH_SEC_CHANGE_PASSWORD = b'12103'

# New in 2.0
DEFINITION.CASSANDRA_CREATE = b'12150'
DEFINITION.CASSANDRA_EDIT = b'12151'
DEFINITION.CASSANDRA_DELETE = b'12152'
DEFINITION.CASSANDRA_CHANGE_PASSWORD = b'12153'

code_to_name = {}

# To prevent 'RuntimeError: dictionary changed size during iteration'
bunch_name, bunch = None, None

for bunch_name, bunch in globals().items():
    if isinstance(bunch, Bunch) and not bunch is Bunch:
        if bunch not in(MESSAGE, MESSAGE_TYPE):
            for code_name, code_value in bunch.items():
                code_name = bunch_name + '_' + code_name
                code_to_name[code_value] = code_name

del bunch_name, bunch, code_name, code_value
Beispiel #2
0
# New in 2.0
SECURITY.APIKEY_CREATE = b'12000'
SECURITY.APIKEY_EDIT = b'12001'
SECURITY.APIKEY_DELETE = b'12002'
SECURITY.APIKEY_CHANGE_PASSWORD = b'12003'

# New in 2.0
SECURITY.XPATH_SEC_CREATE = b'12100'
SECURITY.XPATH_SEC_EDIT = b'12101'
SECURITY.XPATH_SEC_DELETE = b'12102'
SECURITY.XPATH_SEC_CHANGE_PASSWORD = b'12103'

# New in 2.0
DEFINITION.CASSANDRA_CREATE = b'12150'
DEFINITION.CASSANDRA_EDIT = b'12151'
DEFINITION.CASSANDRA_DELETE = b'12152'
DEFINITION.CASSANDRA_CHANGE_PASSWORD = b'12153'

# New in 2.0
SEARCH = Bunch()
SEARCH.ES_CREATE = b'13001'
SEARCH.ES_EDIT = b'13002'
SEARCH.ES_DELETE = b'13003'
SEARCH.ES_CHANGE_PASSWORD = b'13004'

# New in 2.0
QUERY.CASSANDRA_CREATE = b'13150'
QUERY.CASSANDRA_EDIT = b'13151'
QUERY.CASSANDRA_DELETE = b'13152'
QUERY.CASSANDRA_CHANGE_PASSWORD = b'13153'