1 # Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware
 
   3 # Licensed under the Apache License, Version 2.0 (the "License");
 
   4 # you may not use this file except in compliance with the License.
 
   5 # You may obtain a copy of the License at
 
   7 #       http://www.apache.org/licenses/LICENSE-2.0
 
   9 # Unless required by applicable law or agreed to in writing, software
 
  10 # distributed under the License is distributed on an "AS IS" BASIS,
 
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  12 # See the License for the specific language governing permissions and
 
  13 # limitations under the License.
 
  16 CREATE KEYSPACE conductor WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;
 
  18 CREATE TABLE conductor.plans (
 
  24     reservation_counter int,
 
  25     reservation_owner text,
 
  33     translation_counter int,
 
  34     translation_owner text,
 
  39 CREATE INDEX conductor_plans_index ON conductor.plans(status);
 
  41 CREATE KEYSPACE conductor_rpc WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;
 
  43 CREATE TABLE conductor_rpc.controller (
 
  58 CREATE TABLE conductor_rpc.data (
 
  73 INSERT INTO admin.keyspace_master (
 
  74 uuid, application_name, is_aaf, is_api, keyspace_name, password,username)
 
  75 VALUES ( now(), 'conductor', False, True, 'conductor', 'c0nduct0r', 'conductor');
 
  77 INSERT INTO admin.keyspace_master (
 
  78 uuid, application_name, is_aaf, is_api, keyspace_name, password, username)
 
  79 VALUES( now(), 'conductor', False, True, 'conductor_rpc', 'c0nduct0r', 'conductor');
 
  81 CREATE ROLE IF NOT EXISTS conductor WITH PASSWORD = 'c0nduct0r' AND LOGIN = true;
 
  83 GRANT ALL PERMISSIONS on KEYSPACE conductor to 'conductor';
 
  85 GRANT ALL PERMISSIONS on KEYSPACE conductor_rpc to 'conductor';
 
  87 INSERT INTO conductor.plans (id, created, message, name, recommend_max, solution, status, template,timeout, translation,updated) VALUES('healthcheck',1479482603641,'','foo',1,'{"healthcheck": " healthcheck"}','solved','{"healthcheck": "healthcheck"}',3600,'{"healthcheck": "healthcheck"}',1484324150629);