def _issu_cassandra_post_sync_main(): logging.basicConfig( level=logging.INFO, filename='/var/log/contrail/issu_contrail_post_sync.log', format='%(asctime)s %(message)s') args, remaining_args = issu_contrail_config.parse_args() issu_cass_post = ICCassandraClient( args.old_cassandra_address_list, args.new_cassandra_address_list, args.old_cassandra_user, args.old_cassandra_password, args.new_cassandra_user, args.new_cassandra_password, args.old_cassandra_use_ssl, args.old_cassandra_ca_certs, args.new_cassandra_use_ssl, args.new_cassandra_ca_certs, args.odb_prefix, args.ndb_prefix, issu_contrail_config.issu_info_post, issu_contrail_config.logger) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_to_bgp_keyspace) issu_contrail_config.lognprint("Done syncing bgp keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_user_agent) issu_contrail_config.lognprint("Done syncing useragent keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_svc_monitor_keyspace) issu_contrail_config.lognprint("Done syncing svc-monitor keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_dm_keyspace) issu_contrail_config.lognprint("Done syncing dm keyspace", level=SandeshLevel.SYS_INFO)
def _issu_cassandra_post_sync_main(): logging.basicConfig( level=logging.INFO, filename='/var/log/issu_contrail_post_sync.log', format='%(asctime)s %(message)s') args, remaining_args = issu_contrail_config.parse_args() issu_cass_post = ICCassandraClient( args.old_cassandra_address_list, args.new_cassandra_address_list, args.odb_prefix, args.ndb_prefix, issu_contrail_config.issu_info_post, issu_contrail_config.logger) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_to_bgp_keyspace) issu_contrail_config.lognprint("Done syncing bgp keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_user_agent) issu_contrail_config.lognprint("Done syncing useragent keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy( issu_contrail_config.issu_keyspace_svc_monitor_keyspace) issu_contrail_config.lognprint("Done syncing svc-monitor keyspace", level=SandeshLevel.SYS_INFO) issu_cass_post.issu_merge_copy(issu_contrail_config.issu_keyspace_dm_keyspace) issu_contrail_config.lognprint("Done syncing dm keyspace", level=SandeshLevel.SYS_INFO)
def start(self): # Create an instance of issu casandra_config_db_uuid self.issu_cass_config_db_uuid_handle = ICCassandraClient( self.old_cassandra.addr_info, self.new_cassandra.addr_info, self.old_cassandra.user, self.old_cassandra.password, self.new_cassandra.user, self.new_cassandra.password, self.old_cassandra.db_prefix, self.new_cassandra.db_prefix, self.cassandra_issu_info, self.logger) # Prepare it for Issu # Establish a amqp connection with newerversion self.amqp_new_version_handle = VncKombuClient( self.new_rabbit.amqp_ip, self.new_rabbit.amqp_port, self.new_rabbit.amqp_user, self.new_rabbit.amqp_pwd, self.new_rabbit.amqp_vhost, self.new_rabbit.amqp_ha, self.new_rabbit.amqp_q, self.amqp_callback_handler, self.logger) # Create a amqp connection with oldversion, passing all the information self.amqp_old_version_handle = ICKombuClient( self.old_rabbit.amqp_ip, self.old_rabbit.amqp_port, self.old_rabbit.amqp_user, self.old_rabbit.amqp_pwd, self.old_rabbit.amqp_vhost, self.old_rabbit.amqp_ha, self.old_rabbit.amqp_q, self.issu_amqp_callback_handler, self.logger, self.issu_cass_config_db_uuid_handle, self.keyspace_info, self.new_api_info)