-- oam amd mgmt subnets are swapped to create the dracut condition. do $$ declare csr_name_central character varying := 'ye-olde-csr-hostname-1'; cluster_name_central character varying := 'walnutcr-d0000000-001'; oam_vip_hostname_central character varying := 'walnutcr-0000000-nh-pe1e910-001'; ilo_gateway_address_central character varying := 'fd00:4888:2000:7f3:528:23::'; ilo_subnet_central character varying := 'fd00:4888:2000:7f3:528:'; oam_subnet_central character varying := 'fd00:4888:2000:07fd::'; oam_floating_address_central character varying := 'fd00:4888:2000:07fd::290'; mgmt_start_address_central character varying := 'fd00:4888:2000:1100::a'; mgmt_end_address_central character varying := 'fd00:4888:2000:1100::2a'; mgmt_subnet_central character varying := 'fd00:4888:2000:1100::'; mgmt_gateway_address_central character varying := 'fd00:4888:2000:1100:524:23::'; csr_name_remote character varying := 'ye-olde-csr-hostname-2'; cluster_name_remote character varying := 'walnutcr-d9999999-001'; ilo_subnet_remote character varying := 'fd00:4888:2000:1205::'; ilo_gateway_address_remote character varying := 'fd00:4888:2000:1205::1'; oam_floating_address_remote character varying := 'fd00:4888:2000:1209::a'; oam_gateway_address_remote character varying := 'fd00:4888:2000:1209::1'; oam_subnet_remote character varying := 'fd00:4888:2000:1209::'; mgmt_start_address_remote character varying := 'fd00:4888:2000:120a::10'; mgmt_end_address_remote character varying := 'fd00:4888:2000:120a::1f'; mgmt_gateway_address_remote character varying := 'fd00:4888:2000:120a::1'; mgmt_subnet_remote character varying := 'fd00:4888:2000:120a::'; oam_hostname_central_0 character varying := 'walnutcr-0000000-nh-pe2e910-001'; ilo_host_address_central_0 character varying := 'fd00:4888:2000:7f3:528:ff2:0:8'; oam_host_address_central_0 character varying := 'fd00:4888:2000:07fd::292'; oam_hostname_central_1 character varying := 'walnutcr-0000000-nh-pe2e910-002'; ilo_host_address_central_1 character varying := 'fd00:4888:2000:7f3:528:ff2:0:7'; oam_host_address_central_1 character varying := 'fd00:4888:2000:07fd::291'; oam_hostname_central_2 character varying := 'walnutcr-0000000-nh-pe2e910-003'; ilo_host_address_central_2 character varying := 'fd00:4888:2000:7f3:528:ff2:0:9'; oam_host_address_central_2 character varying := 'fd00:4888:2000:07fd::293'; ilo_host_address_remote_0 character varying := 'fd00:4888:2000:1205::26'; oam_host_address_remote_0 character varying := 'fd00:4888:2000:120a::b'; begin update caas_cellsiterouter set ilo_subnet = ilo_subnet_central where csr_hostname = csr_name_central; update caas_cellsiterouter set ilo_default_gateway = ilo_gateway_address_central where csr_hostname = csr_name_central; update caas_cellsiterouter set oam_subnet = oam_subnet_central where csr_hostname = csr_name_central; update caas_cellsiterouter set oam_subnet = oam_subnet_remote where csr_hostname = csr_name_remote; update caas_cellsiterouter set oam_default_gateway = oam_gateway_address_remote where csr_hostname = csr_name_remote; update caas_cellsiterouter set mgmt_subnet = mgmt_subnet_central where csr_hostname = csr_name_central; update caas_cellsiterouter set mgmt_default_gateway = mgmt_gateway_address_central where csr_hostname = csr_name_central; update caas_cellsiterouter set mgmt_subnet = mgmt_subnet_remote where csr_hostname = csr_name_remote; update caas_cellsiterouter set mgmt_default_gateway = mgmt_gateway_address_remote where csr_hostname = csr_name_remote; update caas_cellsiterouter set ilo_subnet = ilo_subnet_remote where csr_hostname = csr_name_remote; update caas_cellsiterouter set ilo_default_gateway = ilo_gateway_address_remote where csr_hostname = csr_name_remote; update caas_cluster set oam_vip_hostname = oam_vip_hostname_central where cluster_name = cluster_name_central; update caas_cluster set oam_vip_address = oam_floating_address_central where cluster_name = cluster_name_central; update caas_cluster set mgmt_address_range_start = mgmt_start_address_central where cluster_name = cluster_name_central; update caas_cluster set mgmt_address_range_end = mgmt_end_address_central where cluster_name = cluster_name_central; update caas_cluster set oam_vip_address = oam_floating_address_remote where cluster_name = cluster_name_remote; update caas_cluster set mgmt_address_range_start = mgmt_start_address_remote where cluster_name = cluster_name_remote; update caas_cluster set mgmt_address_range_end = mgmt_end_address_remote where cluster_name = cluster_name_remote; update caas_server set oam_hostname = oam_hostname_central_0 where ilo_host_address = ilo_host_address_central_0; update caas_server set oam_host_address = oam_host_address_remote_0 where ilo_host_address = ilo_host_address_remote_0; update caas_server set oam_hostname = oam_hostname_central_1 where ilo_host_address = ilo_host_address_central_1; update caas_server set oam_host_address = oam_host_address_central_1 where ilo_host_address = ilo_host_address_central_1; update caas_server set oam_hostname = oam_hostname_central_2 where ilo_host_address = ilo_host_address_central_2; update caas_server set oam_host_address = oam_host_address_central_2 where ilo_host_address = ilo_host_address_central_2; update caas_server set oam_host_address = oam_host_address_remote_0 where ilo_host_address = ilo_host_address_remote_0; end $$; /* truncate table caas_blade cascade; truncate table caas_cellsiterouter cascade; truncate table caas_chassis cascade; truncate table caas_cluster cascade; truncate table caas_credential cascade; truncate table caas_firmwareupgradeschedule cascade; truncate table caas_location cascade; truncate table caas_namespace cascade; truncate table caas_sapclli cascade; truncate table caas_server cascade; truncate table caas_vendor cascade; truncate table caas_vlan cascade; truncate table caas_wrinstallschedule cascade; */