Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

from charms.reactive import ( 

when, 

when_not, 

remove_state, 

set_state 

) 

from libserviceaccount import ServiceAccountHelper 

 

serviceaccount = ServiceAccountHelper() 

 

 

# make sure tools are installed 

@when_not('layer-service-account.installed') 

def install_layer_user(): 

serviceaccount.install_deps() 

set_state('layer-service-account.installed') 

 

 

# apply changes to configuration 

@when('config.changed') 

def update_accounts(): 

remove_state('layer-service-account.configured') 

serviceaccount.update_accounts() 

set_state('layer-service-account.configured')