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"])
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"])
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"])
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"])
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"])