Ejemplo n.º 1
0
 def _ping(self):
     try:
         ping_url = self.url + 'server/info'
         print "Pinging %s " % ping_url
         opener = Utils.auth_and_open_url(ping_url, 'GET', self.username, self.password)
         urllib2.install_opener(opener)
         return True
     except urllib2.URLError:
         return False
Ejemplo n.º 2
0
 def _ping(self):
     try:
         ping_url = self.url + 'server/info'
         print "Pinging %s " % ping_url
         opener = Utils.auth_and_open_url(ping_url, 'GET', self.username, self.password)
         urllib2.install_opener(opener)
         return True
     except urllib2.URLError:
         return False
Ejemplo n.º 3
0
 def stop(self):
     if self.is_running():
         stop_url = self.url + 'server/shutdown'
         opener = Utils.auth_and_open_url(stop_url, 'POST', self.username, self.password)
         print "Stopping the server"
         urllib2.install_opener(opener)
Ejemplo n.º 4
0
 def stop(self):
     if self.is_running():
         stop_url = self.url + 'server/shutdown'
         opener = Utils.auth_and_open_url(stop_url, 'POST', self.username, self.password)
         print "Stopping the server"
         urllib2.install_opener(opener)