2013-06-26 18:52:41 +00:00
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
package xCAT_schema::Clouds ;
################################################################################
#
# xCAT database Schema for representing OpenStack clouds in an xCAT cluster
#
################################################################################
% tabspec = (
clouds = > {
2013-10-18 15:53:10 +08:00
cols = > [ qw( name controller hostip pubinterface mgtinterface datainterface template repository virttype comments disable ) ] , #do not change 'disable' and 'comments', it is required by xCAT
2013-06-26 18:52:41 +00:00
keys = > [ qw( name ) ] ,
required = > [ qw( name ) ] ,
table_desc = > 'OpenStack clouds managed by this xCAT cluster' ,
descriptions = > {
2013-11-01 16:38:35 -04:00
name = > 'The name of the cloud. This is referred to by the nodes in the cloud table.' ,
2013-06-26 18:52:41 +00:00
controller = > 'The xCAT node name of the controller node' ,
2013-10-18 15:53:10 +08:00
hostip = > 'The host IP is in openstack management network on the controller node. It is always the rabbitmq host IP and nova_metadata_ip.' ,
pubinterface = > 'Interface to use for external bridge. The default value is eth1.' ,
mgtinterface = > 'Interface to use for openstack management. It is supposed that the mgtinterface for all the nodes are the same, and in the same network.' ,
datainterface = > 'Interface to use for OpenStack nova vm communication. It is supposed that the datainterface for all the nodes are the same, and in the same network.' ,
template = > 'Every cloud should be related to one environment template file. The absolute path is required.' ,
repository = > ' Every could should be related to the openstack - chef - cookbooks . The absolute path is required . In the repository , there are cookbooks , environments , roles and on on . ' ,
virttype = > 'What hypervisor software layer to use with libvirt (e.g., kvm, qemu).' ,
2013-06-26 18:52:41 +00:00
comments = > 'Any user-written notes.' ,
disable = > "Set to 'yes' or '1' to comment out this row." ,
} ,
} ,
cloud = > {
cols = > [ qw( node cloudname comments disable ) ] ,
keys = > [ qw( node ) ] ,
required = > [ qw( node cloudname ) ] ,
table_desc = > 'xCAT nodes that are used in OpenStack clouds' ,
descriptions = > {
node = > 'The xCAT node name' ,
cloudname = > 'The name of the cloud in the xCAT clouds table that is using this node' ,
comments = > 'Any user-written notes.' ,
disable = > "Set to 'yes' or '1' to comment out this row." ,
} ,
} ,
) ; # end of tabspec definition
##################################################################
#
# Cloud object and attributes for *def commands
#
##################################################################
# cloud object
% defspec = (
cloud = > { attrs = > [] , attrhash = > { } , objkey = > 'name' } ,
) ;
# cloud attributes
@ { $ defspec { cloud } - > { 'attrs' } } =
(
{ attr_name = > 'name' ,
2013-10-18 15:53:10 +08:00
tabentry = > 'clouds.name' ,
access_tabentry = > 'clouds.name=attr:name' ,
2013-06-26 18:52:41 +00:00
} ,
{ attr_name = > 'controller' ,
tabentry = > 'clouds.controller' ,
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'hostip' ,
tabentry = > 'clouds.hostip' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'pubinterface' ,
tabentry = > 'clouds.pubinterface' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'mgtinterface' ,
tabentry = > 'clouds.mgtinterface' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'datainterface' ,
tabentry = > 'clouds.datainterface' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'template' ,
tabentry = > 'clouds.template' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'repository' ,
tabentry = > 'clouds.repository' ,
2013-06-26 18:52:41 +00:00
access_tabentry = > 'clouds.name=attr:name' ,
} ,
2013-10-18 15:53:10 +08:00
{ attr_name = > 'virttype' ,
tabentry = > 'clouds.virttype' ,
access_tabentry = > 'clouds.name=attr:name' ,
}
2013-06-26 18:52:41 +00:00
) ;
# node attributes for clouds
@ { $ defspec { node } - > { 'attrs' } } =
(
{ attr_name = > 'cloud' ,
tabentry = > 'cloud.cloudname' ,
access_tabentry = > 'cloud.node=attr:node' ,
} ,
) ;
1 ;