All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit b7c376c3 authored by Kirk Webb's avatar Kirk Webb

Some updates to plab support:

* removed unused and not generally useful ping checking
* reorganized node discovery and added node info updating
  - e.g., update IP, SITE, or HOSTNAME when they have changed
  - no longer part of the backend module as this is independent of
    which backend is used; may modularize it due to plab's new "trumpet"
    service, which is basically its node DB available via a decentralized
    transport/API.
* introduced new method of getting node info - use plab sites.xml file
* various other cleanups.
parent df1393ba
This diff is collapsed.
......@@ -3,7 +3,6 @@
import sys
sys.path.append("@prefix@/lib")
import httplib
import xmlrpclib
from libtestbed import *
......@@ -17,8 +16,6 @@ DEF_PLC_PASS = "phurds"
DEF_PLC_LEASELEN = 1*30*24*60*60 # add one month (XXX: for now)
DEF_PLC_SHARES = 30
EMULABMAN_EMAIL = "emulabman@emulab.net"
DEF_PLAB_URL = "www.planet-lab.org"
PLAB_LIST_URIS = ("/db/nodes/all_ips.php",)
class PLCagent:
def __init__(self, slicename,
......@@ -43,7 +40,6 @@ class PLCagent:
return self.__server.createSlice(self.__slice, self.__auth)
def deleteSlice(self):
print self.__auth
return self.__server.deleteSlice(self.__slice, self.__auth)
def AssignNodes(self, nodelist):
......@@ -65,7 +61,6 @@ class PLCagent:
userlist = (userlist,)
users = {}
users['userList'] = userlist
print self.__auth
return self.__server.AssignUsers(self.__slice, self.__auth, users)
def UnAssignUsers(self, userlist):
......@@ -98,23 +93,6 @@ class mod_PLC:
self.modname = "mod_PLC"
pass
# XXX: fixup to use online hosts file
def getFree(self):
avail = []
conn = httplib.HTTPSConnection(DEF_PLAB_URL)
for ipuri in PLAB_LIST_URIS:
conn.request("GET", ipuri)
res = conn.getresponse()
if res.status != 200:
raise RuntimeError, "HTTP Error getting IPLIST: %s\n" \
"Code: %d Reason: %s" % \
(ipuri, res.status, res.reason)
avail += res.read().split()
pass
return avail
def createSlice(self, slicename):
agent = PLCagent(slicename)
......
......@@ -34,12 +34,6 @@ class mod_dslice:
self.__nodemgrProxies = {}
self.modname = "mod_dslice"
pass
def getFree(self):
agent = self.__createAgentProxy(insecure = True)
avail = tryXmlrpcCmd(agent.getads)
return avail
def createSlice(self, slicename):
privkey, pubkey = self.__genKeypair()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment