cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/rbac to b367a62
Date Thu, 19 Sep 2013 05:21:22 GMT
Updated Branches:
  refs/heads/rbac 62d60c2b7 -> b367a62a8


Add ACL related DB schema.

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b367a62a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b367a62a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b367a62a

Branch: refs/heads/rbac
Commit: b367a62a83cc95696c6d5b337e164af6dc235608
Parents: 62d60c2
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Sep 18 22:20:01 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Sep 18 22:20:01 2013 -0700

----------------------------------------------------------------------
 setup/db/db/schema-420to430.sql | 50 ++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b367a62a/setup/db/db/schema-420to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-420to430.sql b/setup/db/db/schema-420to430.sql
index 44a884d..3c75278 100644
--- a/setup/db/db/schema-420to430.sql
+++ b/setup/db/db/schema-420to430.sql
@@ -281,3 +281,53 @@ CREATE VIEW `cloud`.`template_view` AS
             and (resource_tags.resource_type = 'Template' or resource_tags.resource_type='ISO')
     where
         vm_template.state='Active';	
+        
+-- ACL DB schema        
+CREATE TABLE `cloud`.`acl_group` (
+  `id` bigint unsigned NOT NULL UNIQUE auto_increment,
+  `name` varchar(255) NOT NULL,
+  `uuid` varchar(40),
+  `removed` datetime COMMENT 'date the group was removed',
+  `created` datetime COMMENT 'date the group was created',
+  PRIMARY KEY  (`id`),
+  INDEX `i_acl_group__removed`(`removed`),
+  CONSTRAINT `uc_acl_group__uuid` UNIQUE (`uuid`)  
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`acl_group_account_map` (
+  `id` bigint unsigned NOT NULL auto_increment,
+  `group_id` bigint unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_acl_group_vm_map___group_id` FOREIGN KEY(`group_id`) REFERENCES `acl_group`
(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_acl_group_vm_map___account_id` FOREIGN KEY(`account_id`) REFERENCES `account`
(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;        
+
+CREATE TABLE `cloud`.`acl_role` (
+  `id` bigint unsigned NOT NULL UNIQUE auto_increment,
+  `name` varchar(255) NOT NULL,
+  `uuid` varchar(40),
+  `removed` datetime COMMENT 'date the role was removed',
+  `created` datetime COMMENT 'date the role was created',
+  PRIMARY KEY  (`id`),
+  INDEX `i_acl_role__removed`(`removed`),
+  CONSTRAINT `uc_acl_role__uuid` UNIQUE (`uuid`)  
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`acl_api_permission` (
+  `id` bigint unsigned NOT NULL UNIQUE auto_increment,
+  `role_id` bigint unsigned NOT NULL,
+  `api` varchar(255) NOT NULL,
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_acl_api_permission___role_id` FOREIGN KEY(`role_id`) REFERENCES `acl_role`
(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`acl_entity_permission` (
+  `id` bigint unsigned NOT NULL UNIQUE auto_increment,
+  `group_id` bigint unsigned NOT NULL,
+  `entity_type` varchar(100) NOT NULL,
+  `entity_id` bigint unsigned NOT NULL,
+  `access_type` varchar(40) NOT NULL,  
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_acl_entity_permission___group_id` FOREIGN KEY(`group_id`) REFERENCES `acl_group`
(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;


Mime
View raw message