From 056dcab91efc64b5f9fc39825f9242e7fa0b9d05 Mon Sep 17 00:00:00 2001 From: luxin Date: Mon, 3 Jul 2017 10:19:19 +0800 Subject: Upload nfvo resmanagement code Change-Id: Ibe023d4b09e1105b84eb43153b4d4037cae691db Signed-off-by: luxin --- .../main/resources/mybatis/mysql/HostMapper.xml | 189 ++++++++++++ .../resources/mybatis/mysql/LocationMapper.xml | 158 ++++++++++ .../main/resources/mybatis/mysql/NetworkMapper.xml | 216 ++++++++++++++ .../main/resources/mybatis/mysql/PortMapper.xml | 180 ++++++++++++ .../main/resources/mybatis/mysql/SitesMapper.xml | 286 ++++++++++++++++++ .../src/main/resources/mybatis/mysql/VimMapper.xml | 52 ++++ .../resources/mybatis/mysql/VirtualLinkMapper.xml | 273 ++++++++++++++++++ .../src/main/resources/mybatis/mysql/VmMapper.xml | 114 ++++++++ .../main/resources/mybatis/mysql/VnfInfoMapper.xml | 96 +++++++ .../src/main/resources/mybatis/mysql/VnfMapper.xml | 319 +++++++++++++++++++++ .../resources/mybatis/mysql/VnfStatusMapper.xml | 213 ++++++++++++++ 11 files changed, 2096 insertions(+) create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/HostMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/LocationMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/NetworkMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/PortMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VimMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VmMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VnfInfoMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VnfMapper.xml create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/VnfStatusMapper.xml (limited to 'ResmanagementService/service/src/main/resources/mybatis') diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/HostMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/HostMapper.xml new file mode 100644 index 0000000..850eef4 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/HostMapper.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + ID, NAME, CPU, MEMORY, DISK, VIM_ID, VIM_NAME + + + + + delete from host + where ID = #{id,jdbcType=VARCHAR} + + + delete from host + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + + insert into host (ID, NAME, CPU, MEMORY, DISK, VIM_ID, VIM_NAME) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{cpu,jdbcType=VARCHAR}, + #{memory,jdbcType=VARCHAR}, #{disk,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR} + , #{vimName,jdbcType=VARCHAR}) + + + insert into host + + + ID, + + + NAME, + + + CPU, + + + MEMORY, + + + DISK, + + + VIM_ID, + + + VIM_NAME, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{cpu,jdbcType=VARCHAR}, + + + #{memory,jdbcType=VARCHAR}, + + + #{disk,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + + + update host + + + NAME = #{name,jdbcType=VARCHAR}, + + + CPU = #{cpu,jdbcType=VARCHAR}, + + + MEMORY = #{memory,jdbcType=VARCHAR}, + + + DISK = #{disk,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + + + NAME = #{name,jdbcType=VARCHAR} + + + AND VIM_ID = #{vimId,jdbcType=VARCHAR} + + + + + update host + set NAME = #{name,jdbcType=VARCHAR}, + CPU = #{cpu,jdbcType=VARCHAR}, + MEMORY = #{memory,jdbcType=VARCHAR}, + DISK = #{disk,jdbcType=VARCHAR}, + VIM_ID = #{vimId,jdbcType=VARCHAR}, + VIM_NAME = #{vimName,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + + update host + + + ID = #{id,jdbcType=VARCHAR}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + CPU = #{cpu,jdbcType=VARCHAR}, + + + MEMORY = #{memory,jdbcType=VARCHAR}, + + + DISK = #{disk,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/LocationMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/LocationMapper.xml new file mode 100644 index 0000000..b0ecba2 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/LocationMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + ID, COUNTRY, LOCATION, LATITUDE, LONGITUDE, DESCRIPTION + + + + + + + delete from location + where ID = #{id,jdbcType=VARCHAR} + + + + insert into location (ID, COUNTRY, LOCATION, + LATITUDE, LONGITUDE, DESCRIPTION) + values (#{id,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, + #{location,jdbcType=VARCHAR}, + #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}) + + + + insert into location + + + ID, + + + COUNTRY, + + + LOCATION, + + + LATITUDE, + + + LONGITUDE, + + + DESCRIPTION, + + + + + #{id,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{location,jdbcType=VARCHAR}, + + + #{latitude,jdbcType=VARCHAR}, + + + #{longitude,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + + + + update location + + + COUNTRY = #{country,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + LATITUDE = #{latitude,jdbcType=VARCHAR}, + + + LONGITUDE = #{longitude,jdbcType=VARCHAR}, + + + DESCRIPTION = #{description,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + + + update location + set COUNTRY = #{country,jdbcType=VARCHAR}, + LOCATION = #{location,jdbcType=VARCHAR}, + LATITUDE = #{latitude,jdbcType=VARCHAR}, + LONGITUDE = #{longitude,jdbcType=VARCHAR}, + DESCRIPTION = #{description,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/NetworkMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/NetworkMapper.xml new file mode 100644 index 0000000..65e4d67 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/NetworkMapper.xml @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + ID, NAME, TENANT_ID, VIM_ID, VIM_NAME, STATUS, + PHYSICAL_NETWORK, NETWORK_TYPE, SEGMENTATION_ID + + + + + delete from network + where ID = #{id,jdbcType=VARCHAR} + + + delete from network + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + + insert into network (ID, NAME, TENANT_ID, + VIM_ID, VIM_NAME, STATUS, + PHYSICAL_NETWORK, NETWORK_TYPE, SEGMENTATION_ID + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{tenantId,jdbcType=VARCHAR}, + #{vimId,jdbcType=VARCHAR}, #{vimName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{physicalNetwork,jdbcType=VARCHAR}, #{networkType,jdbcType=VARCHAR}, + #{segmentationId,jdbcType=VARCHAR} + ) + + + insert into network + + + ID, + + + NAME, + + + TENANT_ID, + + + VIM_ID, + + + VIM_NAME, + + + STATUS, + + + PHYSICAL_NETWORK, + + + NETWORK_TYPE, + + + SEGMENTATION_ID, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{physicalNetwork,jdbcType=VARCHAR}, + + + #{networkType,jdbcType=VARCHAR}, + + + #{segmentationId,jdbcType=VARCHAR}, + + + + + update network + + + NAME = #{name,jdbcType=VARCHAR}, + + + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + PHYSICAL_NETWORK = #{physicalNetwork,jdbcType=VARCHAR}, + + + NETWORK_TYPE = #{networkType,jdbcType=VARCHAR}, + + + SEGMENTATION_ID = #{segmentationId,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + + update network + set NAME = #{name,jdbcType=VARCHAR}, + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + VIM_ID = #{vimId,jdbcType=VARCHAR}, + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + STATUS = #{status,jdbcType=VARCHAR}, + PHYSICAL_NETWORK = #{physicalNetwork,jdbcType=VARCHAR}, + NETWORK_TYPE = #{networkType,jdbcType=VARCHAR}, + SEGMENTATION_ID = #{segmentationId,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + + update network + + + ID = #{id,jdbcType=VARCHAR}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + PHYSICAL_NETWORK = #{physicalNetwork,jdbcType=VARCHAR}, + + + NETWORK_TYPE = #{networkType,jdbcType=VARCHAR}, + + + SEGMENTATION_ID = #{segmentationId,jdbcType=VARCHAR}, + + + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/PortMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/PortMapper.xml new file mode 100644 index 0000000..765dcfe --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/PortMapper.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + ID, NAME, NWTWORK_ID, STATUS, TENANT_ID, VIM_ID, VIM_NAME + + + + + delete from port + where ID = #{id,jdbcType=VARCHAR} + + + delete from port + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + + insert into port (ID, NAME, NWTWORK_ID, STATUS, TENANT_ID, VIM_ID, + VIM_NAME) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{networkId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR} + , #{vimName,jdbcType=VARCHAR}) + + + insert into port + + + ID, + + + NAME, + + + NWTWORK_ID, + + + STATUS, + + + TENANT_ID, + + + VIM_ID, + + + VIM_NAME, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{networkId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + + + update port + + + NAME = #{name,jdbcType=VARCHAR}, + + + NWTWORK_ID = #{networkId,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + + update port + set NAME = #{name,jdbcType=VARCHAR}, + NWTWORK_ID = #{networkId,jdbcType=VARCHAR}, + STATUS = #{status,jdbcType=VARCHAR}, + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + VIM_ID = #{vimId,jdbcType=VARCHAR}, + VIM_NAME = #{vimName,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + + update port + + + ID = #{id,jdbcType=VARCHAR}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + NWTWORK_ID = #{networkId,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TENANT_ID = #{tenantId,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml new file mode 100644 index 0000000..14f7b52 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + ID, NAME, LOCATION, COUNTRY, VIM_ID, VIM_NAME, STATUS, + TOTAL_CPU, + TOTAL_MEMORY, TOTAL_DISK, + USED_CPU, USED_MEMORY, USED_DISK + + + + + delete from site + where ID = + #{id,jdbcType=VARCHAR} + + + insert into site (ID, NAME, LOCATION, + COUNTRY, VIM_ID, + VIM_NAME, STATUS,TOTAL_CPU, TOTAL_MEMORY, TOTAL_DISK, + USED_CPU, + USED_MEMORY, USED_DISK) + values (#{id,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, + #{location,jdbcType=VARCHAR}, + #{country,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR}, + #{vimName,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, + #{totalCPU,jdbcType=VARCHAR}, #{totalMemory,jdbcType=VARCHAR}, + #{totalDisk,jdbcType=VARCHAR}, + #{usedCPU,jdbcType=VARCHAR}, + #{usedMemory,jdbcType=VARCHAR}, + #{usedDisk,jdbcType=VARCHAR}) + + + insert into site + + + ID, + + + NAME, + + + LOCATION, + + + COUNTRY, + + + VIM_ID, + + + VIM_NAME, + + + STATUS, + + + TOTAL_CPU, + + + TOTAL_MEMORY, + + + TOTAL_DISK, + + + USED_CPU, + + + USED_MEMORY, + + + USED_DISK, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{location,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{totalCPU,jdbcType=VARCHAR}, + + + #{totalMemory,jdbcType=VARCHAR}, + + + #{totalDisk,jdbcType=VARCHAR}, + + + #{usedCPU,jdbcType=VARCHAR}, + + + #{usedMemory,jdbcType=VARCHAR}, + + + #{usedDisk,jdbcType=VARCHAR}, + + + + + update site + + + NAME = #{name,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + COUNTRY = #{country,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + + + TOTAL_MEMORY = #{totalMemory,jdbcType=VARCHAR}, + + + TOTAL_DISK = #{totalDisk,jdbcType=VARCHAR}, + + + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + + + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + + + USED_DISK = #{usedDisk,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + + update site + set NAME = #{name,jdbcType=VARCHAR}, + LOCATION + = #{location,jdbcType=VARCHAR}, + COUNTRY = #{country,jdbcType=VARCHAR}, + VIM_ID = #{vimId,jdbcType=VARCHAR}, + VIM_NAME = + #{vimName,jdbcType=VARCHAR}, + STATUS = #{status,jdbcType=VARCHAR}, + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + TOTAL_MEMORY = + #{totalMemory,jdbcType=VARCHAR}, + TOTAL_DISK = + #{totalDisk,jdbcType=VARCHAR}, + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + USED_DISK = + #{usedDisk,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + + update site + + + ID = #{id,jdbcType=VARCHAR}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + COUNTRY = #{country,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + + + TOTAL_MEMORY = #{totalMemory,jdbcType=VARCHAR}, + + + TOTAL_DISK = #{totalDisk,jdbcType=VARCHAR}, + + + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + + + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + + + USED_DISK = #{usedDisk,jdbcType=VARCHAR}, + + + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VimMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VimMapper.xml new file mode 100644 index 0000000..e6f38ef --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VimMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + + + ID + + + + + delete from vim + where ID = #{id,jdbcType=VARCHAR} + + + insert into vim (ID) + values (#{id,jdbcType=VARCHAR}) + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml new file mode 100644 index 0000000..b4d2394 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, name, backend_id, is_public, dc_name, vim_id, vim_name, physicial_net, ns_id, + ns_name, description, network_type, segmentation, mtu, vlan_transparent, router_external, + resource_provider_type, resource_provider_id + + + + + delete from vl + where id = #{id,jdbcType=VARCHAR} + + + insert into vl (id, name, backend_id, + is_public, dc_name, vim_id, + vim_name, physicial_net, ns_id, + ns_name, description, network_type, + segmentation, mtu, vlan_transparent, + router_external, resource_provider_type, resource_provider_id + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{backendId,jdbcType=VARCHAR}, + #{isPublic,jdbcType=VARCHAR}, #{dcName,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR}, + #{vimName,jdbcType=VARCHAR}, #{physicialNet,jdbcType=VARCHAR}, #{nsId,jdbcType=VARCHAR}, + #{nsName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{networkType,jdbcType=VARCHAR}, + #{segmentation,jdbcType=VARCHAR}, #{mtu,jdbcType=VARCHAR}, #{vlanTransparent,jdbcType=VARCHAR}, + #{routerExternal,jdbcType=VARCHAR}, #{resourceProviderType,jdbcType=VARCHAR}, #{resourceProviderId,jdbcType=VARCHAR} + ) + + + insert into vl + + + id, + + + name, + + + backend_id, + + + is_public, + + + dc_name, + + + vim_id, + + + vim_name, + + + physicial_net, + + + ns_id, + + + ns_name, + + + description, + + + network_type, + + + segmentation, + + + mtu, + + + vlan_transparent, + + + router_external, + + + resource_provider_type, + + + resource_provider_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{backendId,jdbcType=VARCHAR}, + + + #{isPublic,jdbcType=VARCHAR}, + + + #{dcName,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + #{physicialNet,jdbcType=VARCHAR}, + + + #{nsId,jdbcType=VARCHAR}, + + + #{nsName,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{networkType,jdbcType=VARCHAR}, + + + #{segmentation,jdbcType=VARCHAR}, + + + #{mtu,jdbcType=VARCHAR}, + + + #{vlanTransparent,jdbcType=VARCHAR}, + + + #{routerExternal,jdbcType=VARCHAR}, + + + #{resourceProviderType,jdbcType=VARCHAR}, + + + #{resourceProviderId,jdbcType=VARCHAR}, + + + + + update vl + + + name = #{name,jdbcType=VARCHAR}, + + + backend_id = #{backendId,jdbcType=VARCHAR}, + + + is_public = #{isPublic,jdbcType=VARCHAR}, + + + dc_name = #{dcName,jdbcType=VARCHAR}, + + + vim_id = #{vimId,jdbcType=VARCHAR}, + + + vim_name = #{vimName,jdbcType=VARCHAR}, + + + physicial_net = #{physicialNet,jdbcType=VARCHAR}, + + + ns_id = #{nsId,jdbcType=VARCHAR}, + + + ns_name = #{nsName,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + network_type = #{networkType,jdbcType=VARCHAR}, + + + segmentation = #{segmentation,jdbcType=VARCHAR}, + + + mtu = #{mtu,jdbcType=VARCHAR}, + + + vlan_transparent = #{vlanTransparent,jdbcType=VARCHAR}, + + + router_external = #{routerExternal,jdbcType=VARCHAR}, + + + resource_provider_type = #{resourceProviderType,jdbcType=VARCHAR}, + + + resource_provider_id = #{resourceProviderId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update vl + set name = #{name,jdbcType=VARCHAR}, + backend_id = #{backendId,jdbcType=VARCHAR}, + is_public = #{isPublic,jdbcType=VARCHAR}, + dc_name = #{dcName,jdbcType=VARCHAR}, + vim_id = #{vimId,jdbcType=VARCHAR}, + vim_name = #{vimName,jdbcType=VARCHAR}, + physicial_net = #{physicialNet,jdbcType=VARCHAR}, + ns_id = #{nsId,jdbcType=VARCHAR}, + ns_name = #{nsName,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + network_type = #{networkType,jdbcType=VARCHAR}, + segmentation = #{segmentation,jdbcType=VARCHAR}, + mtu = #{mtu,jdbcType=VARCHAR}, + vlan_transparent = #{vlanTransparent,jdbcType=VARCHAR}, + router_external = #{routerExternal,jdbcType=VARCHAR}, + resource_provider_type = #{resourceProviderType,jdbcType=VARCHAR}, + resource_provider_id = #{resourceProviderId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VmMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VmMapper.xml new file mode 100644 index 0000000..dc2376c --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VmMapper.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + vm_id, vm_name, vm_status, vnf_instance_id + + + + + delete from vm + where vm_id = #{vmId,jdbcType=VARCHAR} + + + delete from vm + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + insert into vm (vm_id, vm_name, vm_status, + vnf_instance_id) + values (#{vmId,jdbcType=VARCHAR}, #{vmName,jdbcType=VARCHAR}, #{vmStatus,jdbcType=VARCHAR}, + #{vnfInstanceId,jdbcType=VARCHAR}) + + + insert into vm + + + vm_id, + + + vm_name, + + + vm_status, + + + vnf_instance_id, + + + + + #{vmId,jdbcType=VARCHAR}, + + + #{vmName,jdbcType=VARCHAR}, + + + #{vmStatus,jdbcType=VARCHAR}, + + + #{vnfInstanceId,jdbcType=VARCHAR}, + + + + + update vm + + + vm_name = #{vmName,jdbcType=VARCHAR}, + + + vm_status = #{vmStatus,jdbcType=VARCHAR}, + + + vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}, + + + where vm_id = #{vmId,jdbcType=VARCHAR} + + + update vm + set vm_name = #{vmName,jdbcType=VARCHAR}, + vm_status = #{vmStatus,jdbcType=VARCHAR}, + vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + where vm_id = #{vmId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfInfoMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfInfoMapper.xml new file mode 100644 index 0000000..135ccc1 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfInfoMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + vnf_instance_id, ns_id, vnfm_id + + + + + delete from vnfinfo + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + insert into vnfinfo (vnf_instance_id, ns_id, vnfm_id + ) + values (#{vnfInstanceId,jdbcType=VARCHAR}, #{nsId,jdbcType=VARCHAR}, #{vnfmId,jdbcType=VARCHAR} + ) + + + insert into vnfinfo + + + vnf_instance_id, + + + ns_id, + + + vnfm_id, + + + + + #{vnfInstanceId,jdbcType=VARCHAR}, + + + #{nsId,jdbcType=VARCHAR}, + + + #{vnfmId,jdbcType=VARCHAR}, + + + + + update vnfinfo + + + ns_id = #{nsId,jdbcType=VARCHAR}, + + + vnfm_id = #{vnfmId,jdbcType=VARCHAR}, + + + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + update vnfinfo + set ns_id = #{nsId,jdbcType=VARCHAR}, + vnfm_id = #{vnfmId,jdbcType=VARCHAR} + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfMapper.xml new file mode 100644 index 0000000..cd187c3 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfMapper.xml @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, vnf_instance_id, vnf_instance_name, ns_id, ns_name, vnfm_id, vnfm_name, vnf_package_name, + vnf_descriptor_name, vim_id, vim_name, vim_tenant, job_id, vnf_status, vnf_type, + max_vm, max_cpu, max_disk, max_ram, max_shd, max_net, name + + + + + delete from vnf + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + insert into vnf (id, vnf_instance_id, vnf_instance_name, + ns_id, ns_name, vnfm_id, + vnfm_name, vnf_package_name, vnf_descriptor_name, + vim_id, vim_name, vim_tenant, + job_id, vnf_status, vnf_type, + max_vm, max_cpu, max_disk, + max_ram, max_shd, max_net, + name) + values (#{id,jdbcType=VARCHAR}, #{vnfInstanceId,jdbcType=VARCHAR}, #{vnfInstanceName,jdbcType=VARCHAR}, + #{nsId,jdbcType=VARCHAR}, #{nsName,jdbcType=VARCHAR}, #{vnfmId,jdbcType=VARCHAR}, + #{vnfmName,jdbcType=VARCHAR}, #{vnfPackageName,jdbcType=VARCHAR}, #{vnfDescriptorName,jdbcType=VARCHAR}, + #{vimId,jdbcType=VARCHAR}, #{vimName,jdbcType=VARCHAR}, #{vimTenant,jdbcType=VARCHAR}, + #{jobId,jdbcType=VARCHAR}, #{vnfStatus,jdbcType=VARCHAR}, #{vnfType,jdbcType=VARCHAR}, + #{maxVm,jdbcType=INTEGER}, #{maxCpu,jdbcType=INTEGER}, #{maxDisk,jdbcType=INTEGER}, + #{maxRam,jdbcType=INTEGER}, #{maxShd,jdbcType=INTEGER}, #{maxNet,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}) + + + insert into vnf + + + id, + + + vnf_instance_id, + + + vnf_instance_name, + + + ns_id, + + + ns_name, + + + vnfm_id, + + + vnfm_name, + + + vnf_package_name, + + + vnf_descriptor_name, + + + vim_id, + + + vim_name, + + + vim_tenant, + + + job_id, + + + vnf_status, + + + vnf_type, + + + max_vm, + + + max_cpu, + + + max_disk, + + + max_ram, + + + max_shd, + + + max_net, + + + name, + + + + + #{id,jdbcType=VARCHAR}, + + + #{vnfInstanceId,jdbcType=VARCHAR}, + + + #{vnfInstanceName,jdbcType=VARCHAR}, + + + #{nsId,jdbcType=VARCHAR}, + + + #{nsName,jdbcType=VARCHAR}, + + + #{vnfmId,jdbcType=VARCHAR}, + + + #{vnfmName,jdbcType=VARCHAR}, + + + #{vnfPackageName,jdbcType=VARCHAR}, + + + #{vnfDescriptorName,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + #{vimTenant,jdbcType=VARCHAR}, + + + #{jobId,jdbcType=VARCHAR}, + + + #{vnfStatus,jdbcType=VARCHAR}, + + + #{vnfType,jdbcType=VARCHAR}, + + + #{maxVm,jdbcType=INTEGER}, + + + #{maxCpu,jdbcType=INTEGER}, + + + #{maxDisk,jdbcType=INTEGER}, + + + #{maxRam,jdbcType=INTEGER}, + + + #{maxShd,jdbcType=INTEGER}, + + + #{maxNet,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + + + update vnf + + + vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}, + + + vnf_instance_name = #{vnfInstanceName,jdbcType=VARCHAR}, + + + ns_id = #{nsId,jdbcType=VARCHAR}, + + + ns_name = #{nsName,jdbcType=VARCHAR}, + + + vnfm_id = #{vnfmId,jdbcType=VARCHAR}, + + + vnfm_name = #{vnfmName,jdbcType=VARCHAR}, + + + vnf_package_name = #{vnfPackageName,jdbcType=VARCHAR}, + + + vnf_descriptor_name = #{vnfDescriptorName,jdbcType=VARCHAR}, + + + vim_id = #{vimId,jdbcType=VARCHAR}, + + + vim_name = #{vimName,jdbcType=VARCHAR}, + + + vim_tenant = #{vimTenant,jdbcType=VARCHAR}, + + + job_id = #{jobId,jdbcType=VARCHAR}, + + + vnf_status = #{vnfStatus,jdbcType=VARCHAR}, + + + vnf_type = #{vnfType,jdbcType=VARCHAR}, + + + max_vm = #{maxVm,jdbcType=INTEGER}, + + + max_cpu = #{maxCpu,jdbcType=INTEGER}, + + + max_disk = #{maxDisk,jdbcType=INTEGER}, + + + max_ram = #{maxRam,jdbcType=INTEGER}, + + + max_shd = #{maxShd,jdbcType=INTEGER}, + + + max_net = #{maxNet,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update vnf + set vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}, + vnf_instance_name = #{vnfInstanceName,jdbcType=VARCHAR}, + ns_id = #{nsId,jdbcType=VARCHAR}, + ns_name = #{nsName,jdbcType=VARCHAR}, + vnfm_id = #{vnfmId,jdbcType=VARCHAR}, + vnfm_name = #{vnfmName,jdbcType=VARCHAR}, + vnf_package_name = #{vnfPackageName,jdbcType=VARCHAR}, + vnf_descriptor_name = #{vnfDescriptorName,jdbcType=VARCHAR}, + vim_id = #{vimId,jdbcType=VARCHAR}, + vim_name = #{vimName,jdbcType=VARCHAR}, + vim_tenant = #{vimTenant,jdbcType=VARCHAR}, + job_id = #{jobId,jdbcType=VARCHAR}, + vnf_status = #{vnfStatus,jdbcType=VARCHAR}, + vnf_type = #{vnfType,jdbcType=VARCHAR}, + max_vm = #{maxVm,jdbcType=INTEGER}, + max_cpu = #{maxCpu,jdbcType=INTEGER}, + max_disk = #{maxDisk,jdbcType=INTEGER}, + max_ram = #{maxRam,jdbcType=INTEGER}, + max_shd = #{maxShd,jdbcType=INTEGER}, + max_net = #{maxNet,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfStatusMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfStatusMapper.xml new file mode 100644 index 0000000..08a5101 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VnfStatusMapper.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + vnf_instance_id, job_id, ns_id, vnfm_id, response_descriptor, status, progress, status_description, + error_code, response_id, response_history_list, add_vm, del_vm + + + + + delete from vnfstatus + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + insert into vnfstatus (vnf_instance_id, job_id, ns_id, + vnfm_id, response_descriptor, status, + progress, status_description, error_code, + response_id, response_history_list, add_vm, + del_vm) + values (#{vnfInstanceId,jdbcType=VARCHAR}, #{jobId,jdbcType=VARCHAR}, #{nsId,jdbcType=VARCHAR}, + #{vnfmId,jdbcType=VARCHAR}, #{responseDescriptor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{progress,jdbcType=VARCHAR}, #{statusDescription,jdbcType=VARCHAR}, #{errorCode,jdbcType=VARCHAR}, + #{responseId,jdbcType=VARCHAR}, #{responseHistoryList,jdbcType=VARCHAR}, #{addVm,jdbcType=VARCHAR}, + #{delVm,jdbcType=VARCHAR}) + + + insert into vnfstatus + + + vnf_instance_id, + + + job_id, + + + ns_id, + + + vnfm_id, + + + response_descriptor, + + + status, + + + progress, + + + status_description, + + + error_code, + + + response_id, + + + response_history_list, + + + add_vm, + + + del_vm, + + + + + #{vnfInstanceId,jdbcType=VARCHAR}, + + + #{jobId,jdbcType=VARCHAR}, + + + #{nsId,jdbcType=VARCHAR}, + + + #{vnfmId,jdbcType=VARCHAR}, + + + #{responseDescriptor,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{progress,jdbcType=VARCHAR}, + + + #{statusDescription,jdbcType=VARCHAR}, + + + #{errorCode,jdbcType=VARCHAR}, + + + #{responseId,jdbcType=VARCHAR}, + + + #{responseHistoryList,jdbcType=VARCHAR}, + + + #{addVm,jdbcType=VARCHAR}, + + + #{delVm,jdbcType=VARCHAR}, + + + + + update vnfstatus + + + job_id = #{jobId,jdbcType=VARCHAR}, + + + ns_id = #{nsId,jdbcType=VARCHAR}, + + + vnfm_id = #{vnfmId,jdbcType=VARCHAR}, + + + response_descriptor = #{responseDescriptor,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + progress = #{progress,jdbcType=VARCHAR}, + + + status_description = #{statusDescription,jdbcType=VARCHAR}, + + + error_code = #{errorCode,jdbcType=VARCHAR}, + + + response_id = #{responseId,jdbcType=VARCHAR}, + + + response_history_list = #{responseHistoryList,jdbcType=VARCHAR}, + + + add_vm = #{addVm,jdbcType=VARCHAR}, + + + del_vm = #{delVm,jdbcType=VARCHAR}, + + + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + + update vnfstatus + set job_id = #{jobId,jdbcType=VARCHAR}, + ns_id = #{nsId,jdbcType=VARCHAR}, + vnfm_id = #{vnfmId,jdbcType=VARCHAR}, + response_descriptor = #{responseDescriptor,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + progress = #{progress,jdbcType=VARCHAR}, + status_description = #{statusDescription,jdbcType=VARCHAR}, + error_code = #{errorCode,jdbcType=VARCHAR}, + response_id = #{responseId,jdbcType=VARCHAR}, + response_history_list = #{responseHistoryList,jdbcType=VARCHAR}, + add_vm = #{addVm,jdbcType=VARCHAR}, + del_vm = #{delVm,jdbcType=VARCHAR} + where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR} + + \ No newline at end of file -- cgit 1.2.3-korg