570
570
###################
573
def user_get(context, id):
575
return IMPL.user_get(context, id)
578
def user_get_by_uid(context, uid):
579
"""Get user by uid"""
580
return IMPL.user_get_by_uid(context, uid)
583
def user_get_by_access_key(context, access_key):
584
"""Get user by access key"""
585
return IMPL.user_get_by_access_key(context, access_key)
588
def user_create(context, values):
589
"""Create a new user"""
590
return IMPL.user_create(context, values)
593
def user_delete(context, id):
595
return IMPL.user_delete(context, id)
598
def user_get_all(context):
599
"""Create a new user"""
600
return IMPL.user_get_all(context)
603
def user_add_role(context, user_id, role):
604
"""Add another global role for user"""
605
return IMPL.user_add_role(context, user_id, role)
608
def user_remove_role(context, user_id, role):
609
"""Remove global role from user"""
610
return IMPL.user_remove_role(context, user_id, role)
613
def user_get_roles(context, user_id):
614
"""Get global roles for user"""
615
return IMPL.user_get_roles(context, user_id)
618
def user_add_project_role(context, user_id, project_id, role):
619
"""Add project role for user"""
620
return IMPL.user_add_project_role(context, user_id, project_id, role)
623
def user_remove_project_role(context, user_id, project_id, role):
624
"""Remove project role from user"""
625
return IMPL.user_remove_project_role(context, user_id, project_id, role)
628
def user_get_roles_for_project(context, user_id, project_id):
629
"""Return list of roles a user holds on project"""
630
return IMPL.user_get_roles_for_project(context, user_id, project_id)
633
def user_update(context, user_id, values):
635
return IMPL.user_update(context, user_id, values)
638
def project_get(context, id):
639
"""Get project by id"""
640
return IMPL.project_get(context, id)
643
def project_create(context, values):
644
"""Create a new project"""
645
return IMPL.project_create(context, values)
648
def project_add_member(context, project_id, user_id):
649
"""Add user to project"""
650
return IMPL.project_add_member(context, project_id, user_id)
653
def project_get_all(context):
654
"""Get all projects"""
655
return IMPL.project_get_all(context)
658
def project_get_by_user(context, user_id):
659
"""Get all projects of which the given user is a member"""
660
return IMPL.project_get_by_user(context, user_id)
663
def project_remove_member(context, project_id, user_id):
664
"""Remove the given user from the given project"""
665
return IMPL.project_remove_member(context, project_id, user_id)
668
def project_update(context, project_id, values):
669
"""Update Remove the given user from the given project"""
670
return IMPL.project_update(context, project_id, values)
673
def project_delete(context, project_id):
675
return IMPL.project_delete(context, project_id)
573
681
def host_get_networks(context, host):
574
682
"""Return all networks for which the given host is the designated
577
685
return IMPL.host_get_networks(context, host)