mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-24 02:03:52 +03:00
Feature #3175: onedb migrator to add SG table
This commit is contained in:
parent
aba6931256
commit
863b82bb0b
@ -396,7 +396,7 @@ public:
|
||||
*/
|
||||
static string local_db_version()
|
||||
{
|
||||
return "4.9.80";
|
||||
return "4.9.85";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1188,7 +1188,8 @@ ONEDB_SHARED_MIGRATOR_FILES="src/onedb/shared/2.0_to_2.9.80.rb \
|
||||
src/onedb/shared/4.5.80_to_4.6.0.rb"
|
||||
|
||||
ONEDB_LOCAL_MIGRATOR_FILES="src/onedb/local/4.5.80_to_4.7.80.rb \
|
||||
src/onedb/local/4.7.80_to_4.9.80.rb"
|
||||
src/onedb/local/4.7.80_to_4.9.80.rb \
|
||||
src/onedb/local/4.9.80_to_4.9.85.rb"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Configuration files for OpenNebula, to be installed under $ETC_LOCATION
|
||||
|
@ -23,7 +23,7 @@ require 'nokogiri'
|
||||
|
||||
module OneDBFsck
|
||||
VERSION = "4.6.0"
|
||||
LOCAL_VERSION = "4.9.80"
|
||||
LOCAL_VERSION = "4.9.85"
|
||||
|
||||
def check_db_version()
|
||||
db_version = read_db_version()
|
||||
@ -134,7 +134,7 @@ EOT
|
||||
|
||||
tables = ["group_pool", "user_pool", "acl", "image_pool", "host_pool",
|
||||
"network_pool", "template_pool", "vm_pool", "cluster_pool",
|
||||
"datastore_pool", "document_pool", "zone_pool"]
|
||||
"datastore_pool", "document_pool", "zone_pool", "secgroup_pool"]
|
||||
|
||||
federated_tables = ["group_pool", "user_pool", "acl", "zone_pool"]
|
||||
|
||||
|
43
src/onedb/local/4.9.80_to_4.9.85.rb
Normal file
43
src/onedb/local/4.9.80_to_4.9.85.rb
Normal file
@ -0,0 +1,43 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
require 'nokogiri'
|
||||
|
||||
module Migrator
|
||||
def db_version
|
||||
"4.9.85"
|
||||
end
|
||||
|
||||
def one_version
|
||||
"OpenNebula 4.9.85"
|
||||
end
|
||||
|
||||
def up
|
||||
|
||||
init_log_time()
|
||||
|
||||
########################################################################
|
||||
# Security Groups
|
||||
########################################################################
|
||||
|
||||
@db.run "CREATE TABLE secgroup_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body MEDIUMTEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER, UNIQUE(name,uid));"
|
||||
@db.run "INSERT INTO pool_control VALUES('secgroup_pool',99);"
|
||||
|
||||
log_time()
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user