summaryrefslogtreecommitdiff
path: root/yarns/900-remote.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-04-06 15:08:44 +0300
committerLars Wirzenius <liw@liw.fi>2019-04-06 15:08:44 +0300
commit161cd6ead960ecf6afc05bd583718724140d6973 (patch)
tree08ebfd2ce661787fabe7cfaf4731ba9e92a0bc93 /yarns/900-remote.yarn
parente34fe17957621386706febab0389d9c00985a611 (diff)
downloadick2-161cd6ead960ecf6afc05bd583718724140d6973.tar.gz
Refactor: use name V instead of vars in yarn implements
vars is a Python builtin, and as such it's not a great name.
Diffstat (limited to 'yarns/900-remote.yarn')
-rw-r--r--yarns/900-remote.yarn14
1 files changed, 7 insertions, 7 deletions
diff --git a/yarns/900-remote.yarn b/yarns/900-remote.yarn
index 2875d27..6cc7f88 100644
--- a/yarns/900-remote.yarn
+++ b/yarns/900-remote.yarn
@@ -22,31 +22,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
## Authentication setup
IMPLEMENTS GIVEN an RSA key pair for token signing
- vars['private_key_file'] = os.environ['ICK_PRIVATE_KEY']
- assertTrue(os.path.exists(vars['private_key_file']))
+ V['private_key_file'] = os.environ['ICK_PRIVATE_KEY']
+ assertTrue(os.path.exists(V['private_key_file']))
IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+)
user = get_next_match()
scopes = get_next_match()
- key = open(vars['private_key_file']).read()
+ key = open(V['private_key_file']).read()
argv = [
os.path.join(srcdir, 'create-token'),
scopes,
]
token = cliapp.runcmd(argv, feed_stdin=key)
store_token(user, token)
- vars['issuer'] = 'localhost'
- vars['audience'] = 'localhost'
+ V['issuer'] = 'localhost'
+ V['audience'] = 'localhost'
## Controller configuration
IMPLEMENTS GIVEN controller config uses (\S+) at the state directory
- vars['statedir'] = get_next_match()
+ V['statedir'] = get_next_match()
## Start and stop the controller
IMPLEMENTS GIVEN a running ick controller
- vars['url'] = os.environ['ICK_URL']
+ V['url'] = os.environ['ICK_URL']
IMPLEMENTS WHEN user stops ick controller
pass