From 806052bf4df8bd023cfb391794bc5937f2624716 Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Wed, 2 Aug 2017 15:09:24 -0700 Subject: Convert tabs to spaces Per Java Code Style Guide: https://wiki.onap.org/display/DW/Java+code+style Converting tabs to 4 spaces. Issue-Id: SDNC-25 Change-Id: I99ce6c244df72f805b52d0d66403d8b76d9929ae Signed-off-by: Marcus G K Williams --- .../jtest/org/openecomp/sdnc/rm/DataSetup.java | 152 ++++++++++----------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm') diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java index 55824b00c..4ff5bec7f 100644 --- a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java +++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,79 +28,79 @@ import jtest.util.org.openecomp.sdnc.ra.TestTable; public class DataSetup { - private TestDb testDb; - - private TestTable resource = null; - private TestTable allocationItem = null; - - private static final String[] RESOURCE_COLUMNS = - { "asset_id", "resource_name", "resource_type", "lt_used", "ll_label", "ll_reference_count", "rr_used" }; - - private static final String[] ALLOCATION_ITEM_COLUMNS = { - "resource_id", "application_id", "resource_set_id", "resource_union_id", "resource_share_group_list", - "lt_used", "ll_label", "rr_used", "allocation_time" }; - - private void initTables() { - if (resource == null) - resource = testDb.table("RESOURCE", "resource_id", RESOURCE_COLUMNS); - if (allocationItem == null) - allocationItem = testDb.table("ALLOCATION_ITEM", "allocation_item_id", ALLOCATION_ITEM_COLUMNS); - } - - public void cleanup() { - allocationItem.delete("true"); - resource.delete("true"); - } - - public void setupLimitItem( - String resourceName, - String assetId, - String resourceSetId, - String resourceUnionId, - long used) { - initTables(); - - Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); - if (rid == null) { - resource.add(assetId, resourceName, "Limit", 1, null, null, null); - rid = resource.getLastId(); - } - allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, used, null, null, new Date()); - } - - public void setupRangeItem( - String resourceName, - String assetId, - String resourceSetId, - String resourceUnionId, - String used) { - initTables(); - - Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); - if (rid == null) { - resource.add(assetId, resourceName, "Range", null, null, null, used); - rid = resource.getLastId(); - } - allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, null, used, new Date()); - } - - public void setupLabelItem( - String resourceName, - String assetId, - String resourceSetId, - String resourceUnionId, - String label) { - initTables(); - - Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); - if (rid == null) { - resource.add(assetId, resourceName, "Label", null, label, 1, null); - rid = resource.getLastId(); - } - allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, label, null, new Date()); - } - - public void setTestDb(TestDb testDb) { - this.testDb = testDb; - } + private TestDb testDb; + + private TestTable resource = null; + private TestTable allocationItem = null; + + private static final String[] RESOURCE_COLUMNS = + { "asset_id", "resource_name", "resource_type", "lt_used", "ll_label", "ll_reference_count", "rr_used" }; + + private static final String[] ALLOCATION_ITEM_COLUMNS = { + "resource_id", "application_id", "resource_set_id", "resource_union_id", "resource_share_group_list", + "lt_used", "ll_label", "rr_used", "allocation_time" }; + + private void initTables() { + if (resource == null) + resource = testDb.table("RESOURCE", "resource_id", RESOURCE_COLUMNS); + if (allocationItem == null) + allocationItem = testDb.table("ALLOCATION_ITEM", "allocation_item_id", ALLOCATION_ITEM_COLUMNS); + } + + public void cleanup() { + allocationItem.delete("true"); + resource.delete("true"); + } + + public void setupLimitItem( + String resourceName, + String assetId, + String resourceSetId, + String resourceUnionId, + long used) { + initTables(); + + Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); + if (rid == null) { + resource.add(assetId, resourceName, "Limit", 1, null, null, null); + rid = resource.getLastId(); + } + allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, used, null, null, new Date()); + } + + public void setupRangeItem( + String resourceName, + String assetId, + String resourceSetId, + String resourceUnionId, + String used) { + initTables(); + + Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); + if (rid == null) { + resource.add(assetId, resourceName, "Range", null, null, null, used); + rid = resource.getLastId(); + } + allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, null, used, new Date()); + } + + public void setupLabelItem( + String resourceName, + String assetId, + String resourceSetId, + String resourceUnionId, + String label) { + initTables(); + + Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'"); + if (rid == null) { + resource.add(assetId, resourceName, "Label", null, label, 1, null); + rid = resource.getLastId(); + } + allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, label, null, new Date()); + } + + public void setTestDb(TestDb testDb) { + this.testDb = testDb; + } } -- cgit 1.2.3-korg