mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Try unix socket by default in confetty
If the unix socket is available and nothing specified, try to use that
This commit is contained in:
parent
0d425f1f9f
commit
5c0d64d17a
@ -254,6 +254,8 @@ if opts.server: # going over a TLS network
|
||||
server = connect_tls_server(opts.server)
|
||||
elif opts.unixsock:
|
||||
server = connect_unix_server(opts.unixsock)
|
||||
elif os.path.exists("/var/run/confluent/api.sock"):
|
||||
server = connect_unix_server("/var/run/confluent/api.sock")
|
||||
|
||||
#Next stop, reading and writing from whichever of stdin and server goes first.
|
||||
#see pyghmi code for solconnect.py
|
||||
|
@ -216,7 +216,7 @@ class BootDevice(ConfluentChoiceMessage):
|
||||
raise Exception("Invalid boot device argument passed in:" + device)
|
||||
self.kvpairs = {
|
||||
node: {
|
||||
'bootdevice': {'value': device},
|
||||
'device': {'value': device},
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ class InputBootDevice(BootDevice):
|
||||
self.bootdevbynode = {}
|
||||
if not inputdata:
|
||||
raise exc.InvalidArgumentException()
|
||||
if 'bootdevice' not in inputdata:
|
||||
if 'device' not in inputdata:
|
||||
for key in nodes:
|
||||
if key not in inputdata:
|
||||
raise exc.InvalidArgumentException()
|
||||
@ -234,14 +234,14 @@ class InputBootDevice(BootDevice):
|
||||
if ('state' not in datum or
|
||||
datum['state'] not in self.valid_values):
|
||||
raise exc.InvalidArgumenTException()
|
||||
self.bootdevbynode[key] = datum['bootdevice']
|
||||
self.bootdevbynode[key] = datum['device']
|
||||
else:
|
||||
datum = inputdata
|
||||
if ('bootdevice' not in datum or
|
||||
datum['bootdevice'] not in self.valid_values):
|
||||
if ('device' not in datum or
|
||||
datum['device'] not in self.valid_values):
|
||||
raise exc.InvalidArgumentException()
|
||||
for node in nodes:
|
||||
self.bootdevbynode[node] = datum['bootdevice']
|
||||
self.bootdevbynode[node] = datum['device']
|
||||
|
||||
def bootdevice(self, node):
|
||||
return self.bootdevbynode[node]
|
||||
|
Loading…
Reference in New Issue
Block a user