Example #1
0
def primaryOS_role_is_slave(parser):
    role = HAagent_info.get_node_role(parser["PrimaryOS_name"], parser)
    print role
    role = HAagent_info.get_node_role(parser["PrimaryOS_name"], parser)
    print role
    if role == "slave":
        return True
    raise TA_error.Assert_Error("Host (name : %s) role is not slave" %
                                parser["PrimaryOS_name"])
Example #2
0
def primaryOS_role_is_backup(parser):
    role = HAagent_info.get_node_role(parser["PrimaryOS_name"], parser)

    if role == "backup":
        return True
    raise TA_error.Assert_Error("Host (name : %s) role is not backup" %
                                parser["PrimaryOS_name"])
Example #3
0
def backupOS_role_is_primary(parser):

    role = HAagent_info.get_node_role(parser["BackupOS_name"], parser)

    if role == "primary":
        return True
    raise TA_error.Assert_Error("backup (name : %s) role is not primary" %
                                parser["BackupOS_name"])
Example #4
0
def slaveOS_role_is_slave(parser):

    role = HAagent_info.get_node_role(parser["SlaveOS_name"], parser)

    if role == "slave":
        return True
    raise TA_error.Assert_Error("slave (name : %s) role is not slave" %
                                parser["SlaveOS_name"])
Example #5
0
def slaveOS_role_is_backup(parser):

    role = HAagent_info.get_node_role(parser["SlaveOS_name"], parser)
    print role
    if role == "backup":
        return True
    raise TA_error.Assert_Error("slave (name : %s) role is not backup" %
                                parser["SlaveOS_name"])