ngas.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:ngas 作者: ICRAR 项目源码 文件源码
def test_ngas_status():
    """
    Execute the STATUS command against the NGAS server on the host fabric is
    currently pointing at
    """
    try:
        serv = urllib2.urlopen('http://{0}:7777/STATUS'.format(env.host), timeout=5)
    except IOError:
        failure('Problem connecting to server {0}'.format(env.host))
        raise

    response = serv.read()
    serv.close()
    if response.find('Status="SUCCESS"') == -1:
        failure('Problem with response from {0}, not SUCESS as expected'.format(env.host))
        raise ValueError(response)
    else:
        success('Response from {0} OK'.format(env.host))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号