Revision 952a28c0

b/snf-deploy/files/etc/synnefo/pithos.conf
12 12

  
13 13
PITHOS_BASE_URL = 'https://%PITHOS%/pithos'
14 14
ASTAKOS_AUTH_URL = 'https://%ACCOUNTS%/astakos/identity/v2.0'
15

  
16
PITHOS_OAUTH2_CLIENT_CREDENTIALS = ('pithos-view', '12345')
b/snf-deploy/snfdeploy/__init__.py
91 91
      setup_hosts            setup_nfs_server              \
92 92
get_auth_token_from_db
93 93
      setup_image_helper     update_ns_for_ganeti          get_service_details
94
      setup_image_host                                     gnt_instance_add
94
      setup_image_host       astakos_register_pithos_view  gnt_instance_add
95 95
      setup_iptables                                       gnt_network_add
96 96
      setup_kamaki         Test commands:                  register_image
97 97
      setup_lvm              test                          restart_services
......
443 443
            #      add_user fails if no groups found
444 444
            "astakos_loaddata", "add_user", "activate_user",
445 445
            "astakos_register_components",
446
            "astakos_register_pithos_view",
446 447
            "setup_cms", "cms_loaddata",
447 448
            "setup_pithos",
448 449
            "setup_vncauthproxy",
b/snf-deploy/snfdeploy/fabfile.py
610 610

  
611 611

  
612 612
@roles("accounts")
613
def astakos_register_pithos_view():
614
    debug(env.host, " * Register pithos view as oauth2 client...")
615

  
616
    pithos_base_url = "https://%s/pithos" % env.env.pithos.fqdn
617

  
618
    cmd = """
619
    snf-manage oauth2-client-add pithos-view --secret=12345 --is-trusted \
620
    --url {0}
621
    """.format('%s/ui/view' % pithos_base_url)
622
    try_run(cmd)
623

  
624

  
625
@roles("accounts")
613 626
def add_user():
614 627
    debug(env.host, " * adding user %s to astakos..." % env.env.user_email)
615 628
    email = env.env.user_email
......
679 692
    snf-manage syncdb --noinput
680 693
    snf-manage migrate im --delete-ghost-migrations
681 694
    snf-manage migrate quotaholder_app
695
    snf-manage migrate oa2
682 696
    """
683 697
    try_run(cmd)
684 698

  

Also available in: Unified diff