コード例 #1
0
ファイル: terrain.py プロジェクト: jaunis/xivo-acceptance
def initialize():
    raw_config = read_config()
    debug.setup_logging(raw_config)

    logger.info("Initializing acceptance tests...")

    world.config = XivoAcceptanceConfig(raw_config)
    world.config.setup()

    _setup_ssh_client()
    _setup_ws()
    _setup_provd()
    _setup_browser()
    world.logged_agents = []
    world.dummy_ip_address = '10.99.99.99'
コード例 #2
0
ファイル: terrain.py プロジェクト: jaunis/xivo-acceptance
def initialize():
    raw_config = read_config()
    debug.setup_logging(raw_config)

    logger.info("Initializing acceptance tests...")

    world.config = XivoAcceptanceConfig(raw_config)
    world.config.setup()

    _setup_ssh_client()
    _setup_ws()
    _setup_provd()
    _setup_browser()
    world.logged_agents = []
    world.dummy_ip_address = '10.99.99.99'
コード例 #3
0
def main(args):
    if not args:
        print 'Usage: %s xivo_host' % sys.argv[0]
        sys.exit()

    xivo_host = args[0]

    print 'Initializing...'
    raw_config = read_config()
    raw_config.set('xivo', 'hostname', xivo_host)
    world.config = XivoAcceptanceConfig(raw_config)
    world.config.setup()
    terrain._setup_ssh_client()
    terrain._setup_ws()
    terrain._setup_provd()
    terrain._setup_browser()
    PrepareXivoBiz()
コード例 #4
0
def main(args):
    if not args:
        print 'Usage: %s xivo_host' % sys.argv[0]
        sys.exit()

    xivo_host = args[0]

    print 'Initializing...'
    raw_config = read_config()
    raw_config.set('xivo', 'hostname', xivo_host)
    world.config = XivoAcceptanceConfig(raw_config)
    world.config.setup()
    terrain._setup_ssh_client()
    terrain._setup_ws()
    terrain._setup_provd()
    terrain._setup_browser()
    PrepareXivoBiz()
コード例 #5
0
ファイル: common.py プロジェクト: jaunis/xivo-acceptance
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>

import xivo_ws

from xivo_lettuce import config

raw_config = config.read_config()
xivo_host = raw_config.get('xivo', 'hostname')
xivo_ws_username = raw_config.get('webservices_infos', 'login')
xivo_ws_password = raw_config.get('webservices_infos', 'password')

xivo_server_ws = xivo_ws.XivoServer(xivo_host, xivo_ws_username,
                                    xivo_ws_password)


def delete_with_id(obj, id_to_delete):
    obj_ws = getattr(xivo_server_ws, obj)
    for element in find_with_id(obj, id_to_delete):
        obj_ws.delete(element.id)


def delete_with_name(obj, name_to_delete):
コード例 #6
0
ファイル: common.py プロジェクト: jaunis/xivo-acceptance
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>

import xivo_ws

from xivo_lettuce import config


raw_config = config.read_config()
xivo_host = raw_config.get('xivo', 'hostname')
xivo_ws_username = raw_config.get('webservices_infos', 'login')
xivo_ws_password = raw_config.get('webservices_infos', 'password')

xivo_server_ws = xivo_ws.XivoServer(xivo_host,
                                    xivo_ws_username,
                                    xivo_ws_password)


def delete_with_id(obj, id_to_delete):
    obj_ws = getattr(xivo_server_ws, obj)
    for element in find_with_id(obj, id_to_delete):
        obj_ws.delete(element.id)