Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emulab-devel
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sriram Selvam
emulab-devel
Commits
33da8a98
Commit
33da8a98
authored
9 years ago
by
Kirk Webb
Browse files
Options
Downloads
Patches
Plain Diff
Allow specification of server in geni-get (-s server).
Also update my mothership defs file.
parent
f25d292f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clientside/protogeni/geni-get
+18
-11
18 additions, 11 deletions
clientside/protogeni/geni-get
defs-kwebb-emulab
+5
-4
5 additions, 4 deletions
defs-kwebb-emulab
with
23 additions
and
15 deletions
clientside/protogeni/geni-get
+
18
−
11
View file @
33da8a98
...
...
@@ -45,6 +45,7 @@ def usage():
print
"
-c, --client-version display client version
"
print
"
-h, --help show this message
"
print
"
-n, --no-cache disable reading cached results
"
print
"
-s, --server specify server name/address
"
print
"
-p, --port specify server port
"
print
"
-v, --version display server version
"
print
""
...
...
@@ -60,12 +61,13 @@ def dump( sock ):
sock
.
close
()
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:
],
"
achnp:v
"
,
[
"
all
"
,
"
client-version
"
,
"
help
"
,
"
no-cache
"
,
"
port=
"
,
"
version
"
]
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:
],
"
achn
s:
p:v
"
,
[
"
all
"
,
"
client-version
"
,
"
help
"
,
"
no-cache
"
,
"
server=
"
,
"
port=
"
,
"
version
"
]
)
except
getopt
.
GetoptError
as
err
:
print
str
(
err
)
usage
()
sys
.
exit
(
1
)
server
=
None
port
=
PORT
command
=
None
...
...
@@ -81,6 +83,8 @@ for opt, param in opts:
elif
opt
in
(
"
-n
"
,
"
--no-cache
"
):
# Ignored; we don't currently cache anyway...
pass
elif
opt
in
(
"
-s
"
,
"
--server
"
):
server
=
param
elif
opt
in
(
"
-p
"
,
"
--port
"
):
port
=
int
(
param
)
elif
opt
in
(
"
-v
"
,
"
--version
"
):
...
...
@@ -94,17 +98,20 @@ if command == None:
sys
.
exit
(
1
)
# Our tmcd server is also our DNS server, so that's how we find it.
resolv_conf
=
open
(
"
/etc/resolv.conf
"
,
"
r
"
)
for
line
in
resolv_conf
.
readlines
():
match
=
re
.
search
(
r
"
nameserver\s+([0-9.]+)
"
,
line
)
if
match
:
server
=
match
.
group
(
1
)
break
else
:
print
>>
sys
.
stderr
,
sys
.
argv
[
0
]
+
"
: unable to find server address
"
sys
.
exit
(
1
)
if
not
server
:
resolv_conf
=
open
(
"
/etc/resolv.conf
"
,
"
r
"
)
for
line
in
resolv_conf
.
readlines
():
match
=
re
.
search
(
r
"
nameserver\s+([0-9.]+)
"
,
line
)
if
match
:
server
=
match
.
group
(
1
)
break
else
:
print
>>
sys
.
stderr
,
sys
.
argv
[
0
]
+
"
: unable to find server address
"
sys
.
exit
(
1
)
resolv_conf
.
close
()
resolv_conf
.
close
()
# This is a no-op if 'server' is an IP address.
server
=
socket
.
gethostbyname
(
server
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
(
(
server
,
port
)
)
...
...
This diff is collapsed.
Click to expand it.
defs-kwebb-emulab
+
5
−
4
View file @
33da8a98
...
...
@@ -14,7 +14,8 @@ TBTESTSUITEEMAIL=kwebb@flux.utah.edu
WWW=www.emulab.net/dev/kwebb
THISHOMEBASE=Kwebb.Emulab.Net
ELVIN_COMPAT=0
PROTOGENI_SUPPORT=0
WINDOWS_KEY_7PRO_X86=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
WINSUPPORT=1
PORTAL_ENABLE=1
PORTAL_ISPRIMARY=1
#PROTOGENI_SUPPORT=0
#WINSUPPORT=1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment