Skip to content

Commit

Permalink
implement query button in connection settings
Browse files Browse the repository at this point in the history
  • Loading branch information
oroulet committed Dec 13, 2016
1 parent 905d1f2 commit 1302939
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 14 additions & 2 deletions uaclient/connection_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,20 @@ def __init__(self, parent, uri):

@trycatchslot
def query(self):
self.parent.uaclient.get_endpoints(self.uri)
# FIXME: finish
self.ui.modeComboBox.clear()
self.ui.policyComboBox.clear()
endpoints = self.parent.uaclient.get_endpoints(self.uri)
modes = []
policies = []
for edp in endpoints:
mode = edp.SecurityMode.name
if mode not in modes:
self.ui.modeComboBox.addItem(mode)
modes.append(mode)
policy = edp.SecurityPolicyUri.split("#")[1]
if policy not in policies:
self.ui.policyComboBox.addItem(policy)
policies.append(policy)

@property
def security_mode(self):
Expand Down
3 changes: 1 addition & 2 deletions uaclient/uaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ def get_endpoints(self, uri):
for (n, v) in endpoint_to_strings(ep):
logger.info(' %s: %s', n, v)
logger.info('')
return

return edps

def load_security_settings(self, uri):
self.security_mode = None
Expand Down

0 comments on commit 1302939

Please sign in to comment.