// This file is part of Karesansui Core.
//
// Copyright (C) 2009 HDE, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// Authors:
//     Kei Funagayama <kei@karesansui-project.info>
//

// constant value, use in validate
ID_MIN_LENGTH = 1;
ID_MAX_LENGTH = 65535;
USER_MIN_LENGTH = 1;
USER_MAX_LENGTH = 16;
EMAIL_MIN_LENGTH = 1 + 1 + 4;
EMAIL_MAX_LENGTH = 256;
PASSWORD_MIN_LENGTH = 4;
PASSWORD_MAX_LENGTH = 40;
LANGUAGES_MIN_LENGTH = 1;
LANGUAGES_MAX_LENGTH = 6;
SEARCH_MIN_LENGTH = 0;
SEARCH_MAX_LENGTH = 256;
PAGE_MIN_SIZE = 0;
PAGE_MAX_SIZE = 65535;
TAG_MIN_LENGTH = 1;
TAG_MAX_LENGTH = 24;
MACHINE_NAME_MIN_LENGTH = 1;
MACHINE_NAME_MAX_LENGTH = 256;
MEMORY_MIN_SIZE = 64;
DISK_MIN_SIZE = 1;
DOMAIN_ID_MIN_LENGTH = 1;
DOMAIN_ID_MAX_LENGTH = 32;
NOTE_TITLE_MIN_LENGTH = 0;
NOTE_TITLE_MAX_LENGTH = 64;
FQDN_MIN_LENGTH = 0;
FQDN_MAX_LENGTH = 256;

PORT_MIN_NUMBER = 1;
PORT_MAX_NUMBER = 65535;
VNC_PORT_MIN_NUMBER = 5900;
VNC_PORT_MAX_NUMBER = PORT_MAX_NUMBER;

CURRENT_TREE_ID = null;

FIREWALL_LIST_RANGE = 20;

//virDomainState
VIR_DOMAIN_NOSTATE = 0;
VIR_DOMAIN_RUNNING = 1;
VIR_DOMAIN_BLOCKED = 2;
VIR_DOMAIN_PAUSED = 3;
VIR_DOMAIN_SHUTDOWN = 4;
VIR_DOMAIN_SHUTOFF = 5;
VIR_DOMAIN_CRASHED = 6;

// firewall status
FIREWALL_READ = 0;
FIREWALL_START = 1;
FIREWALL_STOP = 2;
FIREWALL_RESTART = 3;
