From 62cc68195bc6881d9362540bad9b2ba98db94bf1 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 26 Feb 2024 12:47:19 -0800 Subject: [PATCH 01/15] change ContainerNode.delta to Long to allow null --- .../src/main/java/org/opencadc/vospace/ContainerNode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java b/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java index e6094eb0..430e890a 100644 --- a/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java +++ b/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * - * (c) 2023. (c) 2023. + * (c) 2024. (c) 2024. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 @@ -95,7 +95,7 @@ public class ContainerNode extends Node { // support server-side container bytesUsed calculations public transient Long bytesUsed; - public transient long delta = 0L; + public transient Long delta; /** * ContainerNode constructor. From 0820fb3b81326a2c7a69a1c691c0558ac995a25e Mon Sep 17 00:00:00 2001 From: Adrian Damian Date: Thu, 29 Feb 2024 10:23:18 -0800 Subject: [PATCH 02/15] Support for allocation owner permissions on the tree --- cadc-test-vos/build.gradle | 2 +- .../opencadc/conformance/vos/NodesTest.java | 22 ++++++++++++-- cadc-vos-server/build.gradle | 2 +- .../server/auth/VOSpaceAuthorizer.java | 29 +++++++++++++++++++ .../test/resources/cadc-registry.properties | 2 +- 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/cadc-test-vos/build.gradle b/cadc-test-vos/build.gradle index c6c3fb6b..cf7cf14a 100644 --- a/cadc-test-vos/build.gradle +++ b/cadc-test-vos/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '2.1.6' +version = '2.1.7' description = 'OpenCADC VOSpace test library' def git_url = 'https://github.com/opencadc/vos' diff --git a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java index 0e049a13..5531ae27 100644 --- a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java +++ b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java @@ -1010,9 +1010,27 @@ public void testPermissions() throws Exception { 201, putAction.getResponseCode()); Assert.assertNull("expected PUT throwable == null", putAction.getThrowable()); - log.debug("Delete node " + childURL); + // test owner of root directory fails to read due to a lack of explicit permission ... + getAction = new HttpGet(childURL, true); + Subject.doAs(authSubject, new RunnableAction(getAction)); + Assert.assertEquals(403, getAction.getResponseCode()); + // ... and to delete HttpDelete deleteAction = new HttpDelete(childURL, true); - Subject.doAs(groupMember, new RunnableAction(deleteAction)); + Subject.doAs(authSubject, new RunnableAction(deleteAction)); + Assert.assertEquals(403, getAction.getResponseCode()); + + // Allocation owners have read and write access over their tree allocation. + // Make root node an allocation node by adding the quota properties and test that the owner of + // that node (authSubject) in their new role can now perform the above actions. + testNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_QUOTA)); + post(nodeURL, nodeURI, testNode); + + getAction = new HttpGet(childURL, true); + Subject.doAs(authSubject, new RunnableAction(getAction)); + Assert.assertEquals(200, getAction.getResponseCode()); + log.debug("Delete node " + childURL); + deleteAction = new HttpDelete(childURL, true); + Subject.doAs(authSubject, new RunnableAction(deleteAction)); log.debug("DELETE responseCode: " + deleteAction.getResponseCode()); Assert.assertEquals("expected PUT response code = 200", 200, deleteAction.getResponseCode()); diff --git a/cadc-vos-server/build.gradle b/cadc-vos-server/build.gradle index b9acfd14..4a9008ba 100644 --- a/cadc-vos-server/build.gradle +++ b/cadc-vos-server/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '2.0.9' +version = '2.0.10' description = 'OpenCADC VOSpace server' def git_url = 'https://github.com/opencadc/vos' diff --git a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java index 1e702f1c..3d4b4c7d 100644 --- a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java +++ b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java @@ -182,6 +182,11 @@ public boolean hasSingleNodeReadPermission(Node node, Subject subject) { return true; // OK } + if (isAllocationOwner(node, subject)) { + log.debug("Allocation owner granted read permission."); + return true; // OK + } + checkDelegation(node, subject); if (log.isDebugEnabled()) { @@ -228,6 +233,11 @@ public boolean hasSingleNodeWritePermission(Node node, Subject subject) { return true; // OK } + if (isAllocationOwner(node, subject)) { + log.debug("Allocation owner granted write permission"); + return true; // OK + } + checkDelegation(node, subject); if (log.isDebugEnabled()) { @@ -339,6 +349,25 @@ private boolean isOwner(Node node, Subject subject) { return false; } + /** + * Check if the specified subject is the owner of the allocation a node belongsto. Allocation owner + * is identified as the owner of the first node in the path that has an associated quota attribute set. + * @param node + * @param subject + * @return + */ + private boolean isAllocationOwner(Node node, Subject subject) { + + Node parent = node.parent; + while (parent != null) { + if (parent.getProperty(VOS.PROPERTY_URI_QUOTA) != null) { + return isOwner(parent, subject); + } + parent = parent.parent; + } + return false; + } + /** * check for delegation cookie and, if present, does an authorization * against it. diff --git a/cavern/src/test/resources/cadc-registry.properties b/cavern/src/test/resources/cadc-registry.properties index 5f16bf1c..2991bf94 100644 --- a/cavern/src/test/resources/cadc-registry.properties +++ b/cavern/src/test/resources/cadc-registry.properties @@ -1,6 +1,6 @@ # configure RegistryClient bootstrap ## BUG / HACK: this gets pulled into the intTest target so needs a legit value -ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://haproxy.cadc.dao.nrc.ca/reg/ +ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://localhost.cadc.dao.nrc.ca/reg/ # local authority map # = From 7ddfeba61718f9a6b84b3a8ff7fc49763d26b4f3 Mon Sep 17 00:00:00 2001 From: Adrian Damian Date: Thu, 29 Feb 2024 10:25:53 -0800 Subject: [PATCH 03/15] Reverted an oops --- cavern/src/test/resources/cadc-registry.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cavern/src/test/resources/cadc-registry.properties b/cavern/src/test/resources/cadc-registry.properties index 2991bf94..5f16bf1c 100644 --- a/cavern/src/test/resources/cadc-registry.properties +++ b/cavern/src/test/resources/cadc-registry.properties @@ -1,6 +1,6 @@ # configure RegistryClient bootstrap ## BUG / HACK: this gets pulled into the intTest target so needs a legit value -ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://localhost.cadc.dao.nrc.ca/reg/ +ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://haproxy.cadc.dao.nrc.ca/reg/ # local authority map # = From 9fbe80bf8032c31dba3041e11073c3556e57516e Mon Sep 17 00:00:00 2001 From: Adrian Damian Date: Thu, 29 Feb 2024 10:27:55 -0800 Subject: [PATCH 04/15] Small change --- .../src/main/java/org/opencadc/conformance/vos/NodesTest.java | 3 +-- cavern/src/test/resources/cadc-registry.properties | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java index 5531ae27..04f733c7 100644 --- a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java +++ b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java @@ -1010,11 +1010,10 @@ public void testPermissions() throws Exception { 201, putAction.getResponseCode()); Assert.assertNull("expected PUT throwable == null", putAction.getThrowable()); - // test owner of root directory fails to read due to a lack of explicit permission ... + // test owner of root directory fails to read and delete due to a lack of explicit permission getAction = new HttpGet(childURL, true); Subject.doAs(authSubject, new RunnableAction(getAction)); Assert.assertEquals(403, getAction.getResponseCode()); - // ... and to delete HttpDelete deleteAction = new HttpDelete(childURL, true); Subject.doAs(authSubject, new RunnableAction(deleteAction)); Assert.assertEquals(403, getAction.getResponseCode()); diff --git a/cavern/src/test/resources/cadc-registry.properties b/cavern/src/test/resources/cadc-registry.properties index 5f16bf1c..2991bf94 100644 --- a/cavern/src/test/resources/cadc-registry.properties +++ b/cavern/src/test/resources/cadc-registry.properties @@ -1,6 +1,6 @@ # configure RegistryClient bootstrap ## BUG / HACK: this gets pulled into the intTest target so needs a legit value -ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://haproxy.cadc.dao.nrc.ca/reg/ +ca.nrc.cadc.reg.client.RegistryClient.baseURL = https://localhost.cadc.dao.nrc.ca/reg/ # local authority map # = From 78c6d5f41ef4f019527d91168b1a0d81331798f5 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Fri, 1 Mar 2024 15:19:52 -0800 Subject: [PATCH 05/15] change Node model bytesUsed fix cavern unit tests and cleanup --- .../org/opencadc/vospace/ContainerNode.java | 5 +- .../java/org/opencadc/vospace/DataNode.java | 4 +- cavern/build.gradle | 2 - .../conform/AsyncPullFromVOSpaceTest.java | 75 ------------------- .../conform/AsyncPushToVOSpaceTest.java | 75 ------------------- .../conform/CreateContainerNodeTest.java | 75 ------------------- .../obsolete/conform/CreateDataNodeTest.java | 75 ------------------- .../obsolete/conform/CreateLinkNodeTest.java | 75 ------------------- .../conform/DeleteContainerNodeTest.java | 75 ------------------- .../obsolete/conform/DeleteDataNodeTest.java | 75 ------------------- .../obsolete/conform/DeleteLinkNodeTest.java | 75 ------------------- .../conform/GetContainerNodeTest.java | 75 ------------------- .../src/obsolete/conform/GetDataNodeTest.java | 75 ------------------- .../src/obsolete/conform/GetLinkNodeTest.java | 75 ------------------- .../conform/MoveContainerNodeTest.java | 75 ------------------- .../obsolete/conform/MoveDataNodeTest.java | 75 ------------------- .../obsolete/conform/MoveLinkNodeTest.java | 75 ------------------- .../conform/SetContainerNodeTest.java | 75 ------------------- .../src/obsolete/conform/SetDataNodeTest.java | 75 ------------------- .../src/obsolete/conform/SetLinkNodeTest.java | 75 ------------------- .../conform/SyncPullFromVOSpaceTest.java | 75 ------------------- .../conform/SyncPushToVOSpaceTest.java | 75 ------------------- .../resources/cadc-registry.properties | 0 .../resources/cavern.properties | 0 .../src/{test => obsolete}/resources/md5file1 | 0 .../src/{test => obsolete}/resources/md5file2 | 0 .../resources/quotaTestFile.txt | 0 .../resources/quotaTestFileSmall.txt | 0 .../resources/smallTextFile.rtf | 0 .../resources/smallTextFile2.rtf | 0 .../resources/sshfs-wrapper | 0 .../nodes/PosixIdentityManagerTest.java | 9 +++ 32 files changed, 13 insertions(+), 1432 deletions(-) delete mode 100644 cavern/src/obsolete/conform/AsyncPullFromVOSpaceTest.java delete mode 100644 cavern/src/obsolete/conform/AsyncPushToVOSpaceTest.java delete mode 100644 cavern/src/obsolete/conform/CreateContainerNodeTest.java delete mode 100644 cavern/src/obsolete/conform/CreateDataNodeTest.java delete mode 100644 cavern/src/obsolete/conform/CreateLinkNodeTest.java delete mode 100644 cavern/src/obsolete/conform/DeleteContainerNodeTest.java delete mode 100644 cavern/src/obsolete/conform/DeleteDataNodeTest.java delete mode 100644 cavern/src/obsolete/conform/DeleteLinkNodeTest.java delete mode 100644 cavern/src/obsolete/conform/GetContainerNodeTest.java delete mode 100644 cavern/src/obsolete/conform/GetDataNodeTest.java delete mode 100644 cavern/src/obsolete/conform/GetLinkNodeTest.java delete mode 100644 cavern/src/obsolete/conform/MoveContainerNodeTest.java delete mode 100644 cavern/src/obsolete/conform/MoveDataNodeTest.java delete mode 100644 cavern/src/obsolete/conform/MoveLinkNodeTest.java delete mode 100644 cavern/src/obsolete/conform/SetContainerNodeTest.java delete mode 100644 cavern/src/obsolete/conform/SetDataNodeTest.java delete mode 100644 cavern/src/obsolete/conform/SetLinkNodeTest.java delete mode 100644 cavern/src/obsolete/conform/SyncPullFromVOSpaceTest.java delete mode 100644 cavern/src/obsolete/conform/SyncPushToVOSpaceTest.java rename cavern/src/{test => obsolete}/resources/cadc-registry.properties (100%) rename cavern/src/{test => obsolete}/resources/cavern.properties (100%) rename cavern/src/{test => obsolete}/resources/md5file1 (100%) rename cavern/src/{test => obsolete}/resources/md5file2 (100%) rename cavern/src/{test => obsolete}/resources/quotaTestFile.txt (100%) rename cavern/src/{test => obsolete}/resources/quotaTestFileSmall.txt (100%) rename cavern/src/{test => obsolete}/resources/smallTextFile.rtf (100%) rename cavern/src/{test => obsolete}/resources/smallTextFile2.rtf (100%) rename cavern/src/{test => obsolete}/resources/sshfs-wrapper (100%) diff --git a/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java b/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java index e6094eb0..972f2555 100644 --- a/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java +++ b/cadc-vos/src/main/java/org/opencadc/vospace/ContainerNode.java @@ -93,9 +93,8 @@ public class ContainerNode extends Node { // server side child node iterator public transient ResourceIterator childIterator; - // support server-side container bytesUsed calculations - public transient Long bytesUsed; - public transient long delta = 0L; + // support server-side container bytesUsed aggregation into "allocations" + public Long bytesUsed; /** * ContainerNode constructor. diff --git a/cadc-vos/src/main/java/org/opencadc/vospace/DataNode.java b/cadc-vos/src/main/java/org/opencadc/vospace/DataNode.java index 9dcd8756..c45e1459 100644 --- a/cadc-vos/src/main/java/org/opencadc/vospace/DataNode.java +++ b/cadc-vos/src/main/java/org/opencadc/vospace/DataNode.java @@ -96,8 +96,8 @@ public class DataNode extends Node { private final transient List accepts = new ArrayList<>(); private final transient List provides = new ArrayList<>(); - // support server-side container listing and bytesUsed calculations - public transient Long bytesUsed; + // support server-side bytesUsed for container listing + public Long bytesUsed; /** * Create new DataNode. diff --git a/cavern/build.gradle b/cavern/build.gradle index cfe2b158..40874989 100644 --- a/cavern/build.gradle +++ b/cavern/build.gradle @@ -45,8 +45,6 @@ dependencies { runtimeOnly 'org.opencadc:cadc-access-control-identity:[1.2.0,)' testImplementation 'junit:junit:[4.0,)' - testImplementation 'xerces:xercesImpl:[2.0,)' - testImplementation 'org.skyscreamer:jsonassert:[1.0,)' testImplementation 'org.opencadc:cadc-test-uws:[1.0,)' testImplementation 'org.opencadc:cadc-access-control-identity:[1.1.0,)' diff --git a/cavern/src/obsolete/conform/AsyncPullFromVOSpaceTest.java b/cavern/src/obsolete/conform/AsyncPullFromVOSpaceTest.java deleted file mode 100644 index 16a0cfa6..00000000 --- a/cavern/src/obsolete/conform/AsyncPullFromVOSpaceTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class AsyncPullFromVOSpaceTest extends ca.nrc.cadc.conformance.vos.AsyncPullFromVOSpaceTest { - -} diff --git a/cavern/src/obsolete/conform/AsyncPushToVOSpaceTest.java b/cavern/src/obsolete/conform/AsyncPushToVOSpaceTest.java deleted file mode 100644 index 7690c647..00000000 --- a/cavern/src/obsolete/conform/AsyncPushToVOSpaceTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class AsyncPushToVOSpaceTest extends ca.nrc.cadc.conformance.vos.AsyncPushToVOSpaceTest { - -} diff --git a/cavern/src/obsolete/conform/CreateContainerNodeTest.java b/cavern/src/obsolete/conform/CreateContainerNodeTest.java deleted file mode 100644 index 65bcaf44..00000000 --- a/cavern/src/obsolete/conform/CreateContainerNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class CreateContainerNodeTest extends ca.nrc.cadc.conformance.vos.CreateContainerNodeTest { - -} diff --git a/cavern/src/obsolete/conform/CreateDataNodeTest.java b/cavern/src/obsolete/conform/CreateDataNodeTest.java deleted file mode 100644 index 66e30012..00000000 --- a/cavern/src/obsolete/conform/CreateDataNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class CreateDataNodeTest extends ca.nrc.cadc.conformance.vos.CreateDataNodeTest { - -} diff --git a/cavern/src/obsolete/conform/CreateLinkNodeTest.java b/cavern/src/obsolete/conform/CreateLinkNodeTest.java deleted file mode 100644 index a13235c1..00000000 --- a/cavern/src/obsolete/conform/CreateLinkNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class CreateLinkNodeTest extends ca.nrc.cadc.conformance.vos.CreateLinkNodeTest { - -} diff --git a/cavern/src/obsolete/conform/DeleteContainerNodeTest.java b/cavern/src/obsolete/conform/DeleteContainerNodeTest.java deleted file mode 100644 index 6f53eabd..00000000 --- a/cavern/src/obsolete/conform/DeleteContainerNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class DeleteContainerNodeTest extends ca.nrc.cadc.conformance.vos.DeleteContainerNodeTest { - -} diff --git a/cavern/src/obsolete/conform/DeleteDataNodeTest.java b/cavern/src/obsolete/conform/DeleteDataNodeTest.java deleted file mode 100644 index ebc13b48..00000000 --- a/cavern/src/obsolete/conform/DeleteDataNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class DeleteDataNodeTest extends ca.nrc.cadc.conformance.vos.DeleteDataNodeTest { - -} diff --git a/cavern/src/obsolete/conform/DeleteLinkNodeTest.java b/cavern/src/obsolete/conform/DeleteLinkNodeTest.java deleted file mode 100644 index 71222712..00000000 --- a/cavern/src/obsolete/conform/DeleteLinkNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class DeleteLinkNodeTest extends ca.nrc.cadc.conformance.vos.DeleteLinkNodeTest { - -} diff --git a/cavern/src/obsolete/conform/GetContainerNodeTest.java b/cavern/src/obsolete/conform/GetContainerNodeTest.java deleted file mode 100644 index 321f8136..00000000 --- a/cavern/src/obsolete/conform/GetContainerNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class GetContainerNodeTest extends ca.nrc.cadc.conformance.vos.GetContainerNodeTest { - -} diff --git a/cavern/src/obsolete/conform/GetDataNodeTest.java b/cavern/src/obsolete/conform/GetDataNodeTest.java deleted file mode 100644 index 1fca95a7..00000000 --- a/cavern/src/obsolete/conform/GetDataNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class GetDataNodeTest extends ca.nrc.cadc.conformance.vos.GetDataNodeTest { - -} diff --git a/cavern/src/obsolete/conform/GetLinkNodeTest.java b/cavern/src/obsolete/conform/GetLinkNodeTest.java deleted file mode 100644 index aabedc69..00000000 --- a/cavern/src/obsolete/conform/GetLinkNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class GetLinkNodeTest extends ca.nrc.cadc.conformance.vos.GetLinkNodeTest { - -} diff --git a/cavern/src/obsolete/conform/MoveContainerNodeTest.java b/cavern/src/obsolete/conform/MoveContainerNodeTest.java deleted file mode 100644 index 4c74c306..00000000 --- a/cavern/src/obsolete/conform/MoveContainerNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class MoveContainerNodeTest extends ca.nrc.cadc.conformance.vos.MoveContainerNodeTest { - -} diff --git a/cavern/src/obsolete/conform/MoveDataNodeTest.java b/cavern/src/obsolete/conform/MoveDataNodeTest.java deleted file mode 100644 index 034e2e1e..00000000 --- a/cavern/src/obsolete/conform/MoveDataNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class MoveDataNodeTest extends ca.nrc.cadc.conformance.vos.MoveDataNodeTest { - -} diff --git a/cavern/src/obsolete/conform/MoveLinkNodeTest.java b/cavern/src/obsolete/conform/MoveLinkNodeTest.java deleted file mode 100644 index 5e830262..00000000 --- a/cavern/src/obsolete/conform/MoveLinkNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class MoveLinkNodeTest extends ca.nrc.cadc.conformance.vos.MoveLinkNodeTest { - -} diff --git a/cavern/src/obsolete/conform/SetContainerNodeTest.java b/cavern/src/obsolete/conform/SetContainerNodeTest.java deleted file mode 100644 index 2b0f5c37..00000000 --- a/cavern/src/obsolete/conform/SetContainerNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class SetContainerNodeTest extends ca.nrc.cadc.conformance.vos.SetContainerNodeTest { - -} diff --git a/cavern/src/obsolete/conform/SetDataNodeTest.java b/cavern/src/obsolete/conform/SetDataNodeTest.java deleted file mode 100644 index 0c5e7c8c..00000000 --- a/cavern/src/obsolete/conform/SetDataNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class SetDataNodeTest extends ca.nrc.cadc.conformance.vos.SetDataNodeTest { - -} diff --git a/cavern/src/obsolete/conform/SetLinkNodeTest.java b/cavern/src/obsolete/conform/SetLinkNodeTest.java deleted file mode 100644 index d2e30d07..00000000 --- a/cavern/src/obsolete/conform/SetLinkNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class SetLinkNodeTest extends ca.nrc.cadc.conformance.vos.SetLinkNodeTest { - -} diff --git a/cavern/src/obsolete/conform/SyncPullFromVOSpaceTest.java b/cavern/src/obsolete/conform/SyncPullFromVOSpaceTest.java deleted file mode 100644 index b2add686..00000000 --- a/cavern/src/obsolete/conform/SyncPullFromVOSpaceTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class SyncPullFromVOSpaceTest extends ca.nrc.cadc.conformance.vos.SyncPullFromVOSpaceTest { - -} diff --git a/cavern/src/obsolete/conform/SyncPushToVOSpaceTest.java b/cavern/src/obsolete/conform/SyncPushToVOSpaceTest.java deleted file mode 100644 index f0799ade..00000000 --- a/cavern/src/obsolete/conform/SyncPushToVOSpaceTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - ************************************************************************ - ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* - ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** - * - * (c) 2021. (c) 2021. - * Government of Canada Gouvernement du Canada - * National Research Council Conseil national de recherches - * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 - * All rights reserved Tous droits réservés - * - * NRC disclaims any warranties, Le CNRC dénie toute garantie - * expressed, implied, or énoncée, implicite ou légale, - * statutory, of any kind with de quelque nature que ce - * respect to the software, soit, concernant le logiciel, - * including without limitation y compris sans restriction - * any warranty of merchantability toute garantie de valeur - * or fitness for a particular marchande ou de pertinence - * purpose. NRC shall not be pour un usage particulier. - * liable in any event for any Le CNRC ne pourra en aucun cas - * damages, whether direct or être tenu responsable de tout - * indirect, special or general, dommage, direct ou indirect, - * consequential or incidental, particulier ou général, - * arising from the use of the accessoire ou fortuit, résultant - * software. Neither the name de l'utilisation du logiciel. Ni - * of the National Research le nom du Conseil National de - * Council of Canada nor the Recherches du Canada ni les noms - * names of its contributors may de ses participants ne peuvent - * be used to endorse or promote être utilisés pour approuver ou - * products derived from this promouvoir les produits dérivés - * software without specific prior de ce logiciel sans autorisation - * written permission. préalable et particulière - * par écrit. - * - * This file is part of the Ce fichier fait partie du projet - * OpenCADC project. OpenCADC. - * - * OpenCADC is free software: OpenCADC est un logiciel libre ; - * you can redistribute it and/or vous pouvez le redistribuer ou le - * modify it under the terms of modifier suivant les termes de - * the GNU Affero General Public la “GNU Affero General Public - * License as published by the License” telle que publiée - * Free Software Foundation, par la Free Software Foundation - * either version 3 of the : soit la version 3 de cette - * License, or (at your option) licence, soit (à votre gré) - * any later version. toute version ultérieure. - * - * OpenCADC is distributed in the OpenCADC est distribué - * hope that it will be useful, dans l’espoir qu’il vous - * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE - * without even the implied GARANTIE : sans même la garantie - * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ - * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF - * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence - * General Public License for Générale Publique GNU Affero - * more details. pour plus de détails. - * - * You should have received Vous devriez avoir reçu une - * a copy of the GNU Affero copie de la Licence Générale - * General Public License along Publique GNU Affero avec - * with OpenCADC. If not, see OpenCADC ; si ce n’est - * . pas le cas, consultez : - * . - * - ************************************************************************ - */ -package org.opencadc.cavern.conform; - -/** - * @author majorb - * - */ -public class SyncPushToVOSpaceTest extends ca.nrc.cadc.conformance.vos.SyncPushToVOSpaceTest { - -} diff --git a/cavern/src/test/resources/cadc-registry.properties b/cavern/src/obsolete/resources/cadc-registry.properties similarity index 100% rename from cavern/src/test/resources/cadc-registry.properties rename to cavern/src/obsolete/resources/cadc-registry.properties diff --git a/cavern/src/test/resources/cavern.properties b/cavern/src/obsolete/resources/cavern.properties similarity index 100% rename from cavern/src/test/resources/cavern.properties rename to cavern/src/obsolete/resources/cavern.properties diff --git a/cavern/src/test/resources/md5file1 b/cavern/src/obsolete/resources/md5file1 similarity index 100% rename from cavern/src/test/resources/md5file1 rename to cavern/src/obsolete/resources/md5file1 diff --git a/cavern/src/test/resources/md5file2 b/cavern/src/obsolete/resources/md5file2 similarity index 100% rename from cavern/src/test/resources/md5file2 rename to cavern/src/obsolete/resources/md5file2 diff --git a/cavern/src/test/resources/quotaTestFile.txt b/cavern/src/obsolete/resources/quotaTestFile.txt similarity index 100% rename from cavern/src/test/resources/quotaTestFile.txt rename to cavern/src/obsolete/resources/quotaTestFile.txt diff --git a/cavern/src/test/resources/quotaTestFileSmall.txt b/cavern/src/obsolete/resources/quotaTestFileSmall.txt similarity index 100% rename from cavern/src/test/resources/quotaTestFileSmall.txt rename to cavern/src/obsolete/resources/quotaTestFileSmall.txt diff --git a/cavern/src/test/resources/smallTextFile.rtf b/cavern/src/obsolete/resources/smallTextFile.rtf similarity index 100% rename from cavern/src/test/resources/smallTextFile.rtf rename to cavern/src/obsolete/resources/smallTextFile.rtf diff --git a/cavern/src/test/resources/smallTextFile2.rtf b/cavern/src/obsolete/resources/smallTextFile2.rtf similarity index 100% rename from cavern/src/test/resources/smallTextFile2.rtf rename to cavern/src/obsolete/resources/smallTextFile2.rtf diff --git a/cavern/src/test/resources/sshfs-wrapper b/cavern/src/obsolete/resources/sshfs-wrapper similarity index 100% rename from cavern/src/test/resources/sshfs-wrapper rename to cavern/src/obsolete/resources/sshfs-wrapper diff --git a/cavern/src/test/java/org/opencadc/cavern/nodes/PosixIdentityManagerTest.java b/cavern/src/test/java/org/opencadc/cavern/nodes/PosixIdentityManagerTest.java index 3d327a26..1b1f4bfe 100644 --- a/cavern/src/test/java/org/opencadc/cavern/nodes/PosixIdentityManagerTest.java +++ b/cavern/src/test/java/org/opencadc/cavern/nodes/PosixIdentityManagerTest.java @@ -113,6 +113,14 @@ public void testNull() { } } + @Test + public void testCache() { + log.warn("technical debt: testCache not implemented yet"); + } + + /* + // this requires a configured and functional IdentityManager + back end services + // and doesn't belong in unit test @Test public void testRoundTrip() { try { @@ -150,4 +158,5 @@ public void testRoundTrip() { Assert.fail("unexpected exception: " + unexpected); } } + */ } From 749485d77238b97caa968398a022bba51149fa3a Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 11:45:16 -0800 Subject: [PATCH 06/15] cadc-vos: update NodeReader/writer to use DataNode.bytesUsed --- .../org/opencadc/vospace/io/NodeReader.java | 3 +- .../org/opencadc/vospace/io/NodeWriter.java | 5 +- .../vospace/io/NodeReaderWriterTest.java | 77 ++++++++++++------- 3 files changed, 54 insertions(+), 31 deletions(-) diff --git a/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeReader.java b/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeReader.java index b904eb56..956723a7 100644 --- a/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeReader.java +++ b/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeReader.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * - * (c) 2023. (c) 2023. + * (c) 2024. (c) 2024. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 @@ -522,6 +522,7 @@ protected void setNodeVariables(Element element, Namespace namespace, node.isPublic = getBooleanProperty(VOS.PROPERTY_URI_ISPUBLIC, properties); if (node instanceof DataNode) { DataNode dn = (DataNode) node; + dn.bytesUsed = getLongProperty(VOS.PROPERTY_URI_CONTENTLENGTH, properties); dn.getAccepts().addAll(getViewURIs(element, namespace, "accepts")); dn.getProvides().addAll(getViewURIs(element, namespace, "provides")); } diff --git a/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeWriter.java b/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeWriter.java index cfa7d88d..c6d4fba9 100644 --- a/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeWriter.java +++ b/cadc-vos/src/main/java/org/opencadc/vospace/io/NodeWriter.java @@ -403,8 +403,9 @@ protected void addLinkNodeVariablesToProperties(LinkNode node, Set * @param properties a Set of NodeProperty. */ protected void addDataNodeVariablesToProperties(DataNode node, Set properties) { - // placeholder: nothing extra - // note: DataNode.busy is an attribute handled elsewhere + if (node.bytesUsed != null) { + properties.add(new NodeProperty(VOS.PROPERTY_URI_CONTENTLENGTH, node.bytesUsed.toString())); + } } /** diff --git a/cadc-vos/src/test/java/org/opencadc/vospace/io/NodeReaderWriterTest.java b/cadc-vos/src/test/java/org/opencadc/vospace/io/NodeReaderWriterTest.java index e75ce724..3fb1d2fe 100644 --- a/cadc-vos/src/test/java/org/opencadc/vospace/io/NodeReaderWriterTest.java +++ b/cadc-vos/src/test/java/org/opencadc/vospace/io/NodeReaderWriterTest.java @@ -190,6 +190,7 @@ private void compareContainerNodes(ContainerNode n1, ContainerNode n2) { private void compareDataNodes(DataNode n1, DataNode n2) { Assert.assertEquals("busy", n1.busy, n2.busy); + Assert.assertEquals("busy", n1.bytesUsed, n2.bytesUsed); } private void compareLinkNodes(LinkNode n1, LinkNode n2) { @@ -231,10 +232,11 @@ private void compareNodes(Node n1, Node n2) { public void testReadOnlyNodeProps() { Set immutable = new TreeSet<>( Arrays.asList( - VOS.PROPERTY_URI_CONTENTLENGTH, + //VOS.PROPERTY_URI_CREATOR, // not feasible to validate this is readOnly + //VOS.PROPERTY_URI_CONTENTLENGTH, // not feasible to validate this is readOnly VOS.PROPERTY_URI_CONTENTMD5, - VOS.PROPERTY_URI_CREATOR, - VOS.PROPERTY_URI_QUOTA + VOS.PROPERTY_URI_QUOTA, + URI.create("my:custom:prop") ) ); try { @@ -243,32 +245,49 @@ public void testReadOnlyNodeProps() { NodeWriter instance = new NodeWriter(); instance.setImmutableProperties(immutable); - DataNode minDataNode = createMinDataNode(); - minDataNode.ownerDisplay = "somebody"; - minDataNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTLENGTH, "666")); - minDataNode.isPublic = true; + DataNode orig = createMinDataNode(); + orig.bytesUsed = 0L; // read-only but cannot verify + orig.isPublic = true; // cannot verify + orig.ownerDisplay = "somebody"; // cannot verify? + NodeProperty title = new NodeProperty(VOS.PROPERTY_URI_TITLE, "title"); title.readOnly = false; // explicit - minDataNode.getProperties().add(title); - instance.write(dataURI, minDataNode, sb, VOS.Detail.max); - log.info(sb.toString()); - - // validate the XML - NodeReader reader = new NodeReader(); - NodeReader.NodeReaderResult result = reader.read(sb.toString()); - Node n2 = result.node; + orig.getProperties().add(title); + + NodeProperty md5 = new NodeProperty(VOS.PROPERTY_URI_CONTENTMD5, "362f2557fd5e0da097d6a5f7032d5044"); + md5.readOnly = true; + orig.getProperties().add(md5); + + NodeProperty quota = new NodeProperty(VOS.PROPERTY_URI_QUOTA, "12345"); + quota.readOnly = true; + orig.getProperties().add(quota); + + NodeProperty custom = new NodeProperty(URI.create("my:custom:prop"), "foo"); + custom.readOnly = true; + orig.getProperties().add(custom); + + instance.write(dataURI, orig, sb, VOS.Detail.max); + String xml = sb.toString(); + log.info(xml); + + // TODO: need to verify that the property elements in the XML have readOnly=true + // not feasible to validate this with NodeReader because some things get assigned to + // Node member vars instead so we need those that do not + NodeReader r = new NodeReader(); + NodeReader.NodeReaderResult nr = r.read(xml); + + DataNode actual = (DataNode) nr.node; + Assert.assertEquals(orig.bytesUsed, actual.bytesUsed); + Assert.assertEquals(orig.isPublic, actual.isPublic); + Assert.assertEquals(orig.ownerDisplay, actual.ownerDisplay); + + for (URI rop : immutable) { + NodeProperty ap = actual.getProperty(rop); + log.info("found: " + ap); + Assert.assertNotNull(ap); + Assert.assertTrue(ap.readOnly); + } - Assert.assertNotNull(n2.ownerDisplay); - NodeProperty np = n2.getProperty(VOS.PROPERTY_URI_CONTENTLENGTH); - Assert.assertNotNull(np); - Assert.assertNotNull(np.readOnly); // xsd default to false so always passes - Assert.assertTrue(np.readOnly); - - // make sure default version is still 2.0 - //Assert.assertEquals(VOS.VOSPACE_20, n2.version); - Assert.assertTrue(n2 instanceof DataNode); - Assert.assertEquals(dataURI, result.vosURI); - compareNodes(minDataNode, n2); } catch (Exception t) { log.error(t); Assert.fail(t.getMessage()); @@ -307,6 +326,7 @@ public void writeValidMinDataNode() { StringBuilder sb = new StringBuilder(); NodeWriter instance = new NodeWriter(); DataNode minDataNode = createMinDataNode(); + minDataNode.bytesUsed = 0L; instance.write(dataURI, minDataNode, sb, VOS.Detail.max); log.info(sb.toString()); @@ -333,6 +353,7 @@ public void writeValidMaxDataNode() { StringBuilder sb = new StringBuilder(); NodeWriter instance = new NodeWriter(); DataNode maxDataNode = createMaxDataNode(); + maxDataNode.bytesUsed = 123L; instance.write(dataURI, maxDataNode, sb, VOS.Detail.max); log.info(sb.toString()); @@ -372,6 +393,7 @@ public void writeValidUnstructuredDataNode() { StringBuilder sb = new StringBuilder(); NodeWriter instance = new NodeWriter(); UnstructuredDataNode unstructuredDataNode = createUnstructuredDataNode(); + unstructuredDataNode.bytesUsed = 456L; instance.write(unstructuredURI, unstructuredDataNode, sb, VOS.Detail.max); log.info(sb.toString()); @@ -395,6 +417,7 @@ public void writeValidStructuredDataNode() { StringBuilder sb = new StringBuilder(); NodeWriter instance = new NodeWriter(); StructuredDataNode structuredDataNode = createStructuredDataNode(); + structuredDataNode.bytesUsed = 789L; instance.write(structuredURI, structuredDataNode, sb, VOS.Detail.max); log.info(sb.toString()); @@ -646,8 +669,6 @@ private DataNode createMaxDataNode() { maxDataNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTENCODING, "content-encoding")); URI contentChecksum = URI.create("md5:fd02b367a37f1ec989be20be40672fc5"); String contentLastModified = "2023-02-03T08:45:12.345"; - Long contentLength = 540000L; - maxDataNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTLENGTH, contentLength.toString())); maxDataNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTMD5, contentChecksum.toASCIIString())); maxDataNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTDATE, contentLastModified)); maxDataNode.getAccepts().add(VOS.VIEW_ANY); From 6cab291c7c388956cb306f42c4b42e7ddbbeb342 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 11:46:55 -0800 Subject: [PATCH 07/15] minor tweak to NodesTest allocation permission changes --- cadc-test-vos/build.gradle | 2 +- .../main/java/org/opencadc/conformance/vos/NodesTest.java | 5 +++-- .../src/main/java/org/opencadc/conformance/vos/VOSTest.java | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cadc-test-vos/build.gradle b/cadc-test-vos/build.gradle index cf7cf14a..dfb28ed2 100644 --- a/cadc-test-vos/build.gradle +++ b/cadc-test-vos/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '2.1.7' +version = '2.1.8' description = 'OpenCADC VOSpace test library' def git_url = 'https://github.com/opencadc/vos' diff --git a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java index 04f733c7..fa890a34 100644 --- a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java +++ b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/NodesTest.java @@ -967,7 +967,8 @@ public void testPermissions() throws Exception { final URL childURL = getNodeURL(nodesServiceURL, childPath); // cleanup - delete(childURL, false); + HttpDelete deleteChildAction = new HttpDelete(childURL, true); + Subject.doAs(groupMember, new RunnableAction(deleteChildAction)); delete(nodeURL, false); // PUT the node @@ -1021,7 +1022,7 @@ public void testPermissions() throws Exception { // Allocation owners have read and write access over their tree allocation. // Make root node an allocation node by adding the quota properties and test that the owner of // that node (authSubject) in their new role can now perform the above actions. - testNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_QUOTA)); + testNode.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_QUOTA, "123456")); post(nodeURL, nodeURI, testNode); getAction = new HttpGet(childURL, true); diff --git a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/VOSTest.java b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/VOSTest.java index efe2b9aa..523c8b6f 100644 --- a/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/VOSTest.java +++ b/cadc-test-vos/src/main/java/org/opencadc/conformance/vos/VOSTest.java @@ -100,6 +100,7 @@ import org.opencadc.vospace.DataNode; import org.opencadc.vospace.Node; import org.opencadc.vospace.NodeNotSupportedException; +import org.opencadc.vospace.NodeProperty; import org.opencadc.vospace.VOS; import org.opencadc.vospace.VOSURI; import org.opencadc.vospace.io.NodeParsingException; @@ -139,12 +140,12 @@ protected VOSTest(URI resourceID, File testCert) { @Before public void initTestContainer() throws Exception { String name = rootTestFolderName; - URL nodeURL = getNodeURL(nodesServiceURL, null); // method already puts test folder name in - VOSURI nodeURI = getVOSURI(null); ContainerNode testNode = new ContainerNode(name); testNode.isPublic = true; testNode.inheritPermissions = false; + URL nodeURL = getNodeURL(nodesServiceURL, null); // method already puts test folder name in + VOSURI nodeURI = getVOSURI(null); NodeReader.NodeReaderResult result = get(nodeURL, 200, XML_CONTENT_TYPE, false); if (result == null) { put(nodeURL, nodeURI, testNode); From 1cd57353b5c7a151123bc06c02c95d7bd33eba0d Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 11:54:58 -0800 Subject: [PATCH 08/15] add NodePersistecne API cavern: add stub method for API change --- .../opencadc/vospace/server/NodePersistence.java | 14 +++++++++++++- .../cavern/nodes/FileSystemNodePersistence.java | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java index 4af0bd11..44da1a31 100644 --- a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java +++ b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * - * (c) 2023. (c) 2023. + * (c) 2024. (c) 2024. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 @@ -108,6 +108,18 @@ public interface NodePersistence { */ ContainerNode getRootNode(); + /** + * Get the set of container nodes that are the immediate parent of "allocations". + * Allocations are container nodes that belong to users. Use case 1: VOSpaceAuthorizer + * needs to identity allocations in order to grant allocation owner extra permissions + * to manage content in a multi-user/project environment. Use case 2: constrain the + * "create allocation" create node with different user) should be constrained to + * only happen in these container nodes. + * + * @return set of configured containers where allocations can be found + */ + Set getAllocationHolders(); + /** * Get the set of properties that are only writable by admins. * diff --git a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java index c673df39..84d15ee7 100644 --- a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java +++ b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java @@ -216,6 +216,11 @@ public ContainerNode getRootNode() { return root; } + @Override + public Set getAllocationHolders() { + throw new UnsupportedOperationException("not implemented"); + } + @Override public Set getAdminProps() { return ADMIN_PROPS; From db57a9fe9bca4ec97f272d26f4f6f32e18fd5cb4 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 11:56:29 -0800 Subject: [PATCH 09/15] minor tweaks to VOSpaceAuthorizer and is-allocation unit test (incomplete) --- cadc-vos-server/build.gradle | 2 +- .../server/auth/VOSpaceAuthorizer.java | 14 +- .../server/auth/VOSpaceAuthorizerTest.java | 196 ++++++++++++++++++ 3 files changed, 208 insertions(+), 4 deletions(-) create mode 100644 cadc-vos-server/src/test/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizerTest.java diff --git a/cadc-vos-server/build.gradle b/cadc-vos-server/build.gradle index 4a9008ba..4d59e187 100644 --- a/cadc-vos-server/build.gradle +++ b/cadc-vos-server/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '2.0.10' +version = '2.0.11' description = 'OpenCADC VOSpace server' def git_url = 'https://github.com/opencadc/vos' diff --git a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java index 3d4b4c7d..0399a959 100644 --- a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java +++ b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizer.java @@ -131,6 +131,12 @@ public VOSpaceAuthorizer(NodePersistence nodePersistence) { this.nodePersistence = nodePersistence; } + // for unit tests + VOSpaceAuthorizer() { + this.nodePersistence = null; + } + + public void setDisregardLocks(boolean disregardLocks) { this.disregardLocks = disregardLocks; } @@ -325,7 +331,7 @@ private boolean hasMembership(Set groups, Subject subject) { * @param node node to check * @return true of the current subject is the owner, otherwise false */ - private boolean isOwner(Node node, Subject subject) { + boolean isOwner(Node node, Subject subject) { Subject owner = node.owner; if (owner == null) { throw new IllegalStateException("BUG: no owner found for node: " + node); @@ -356,15 +362,17 @@ private boolean isOwner(Node node, Subject subject) { * @param subject * @return */ - private boolean isAllocationOwner(Node node, Subject subject) { - + boolean isAllocationOwner(Node node, Subject subject) { + log.debug("isAllocationOwner: START"); Node parent = node.parent; while (parent != null) { if (parent.getProperty(VOS.PROPERTY_URI_QUOTA) != null) { + log.debug("found allocation owner: " + parent.ownerID + " at " + parent.getName()); return isOwner(parent, subject); } parent = parent.parent; } + log.debug("not found: allocation owner"); return false; } diff --git a/cadc-vos-server/src/test/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizerTest.java b/cadc-vos-server/src/test/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizerTest.java new file mode 100644 index 00000000..c008c0e2 --- /dev/null +++ b/cadc-vos-server/src/test/java/org/opencadc/vospace/server/auth/VOSpaceAuthorizerTest.java @@ -0,0 +1,196 @@ +/* +************************************************************************ +******************* CANADIAN ASTRONOMY DATA CENTRE ******************* +************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** +* +* (c) 2024. (c) 2024. +* Government of Canada Gouvernement du Canada +* National Research Council Conseil national de recherches +* Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 +* All rights reserved Tous droits réservés +* +* NRC disclaims any warranties, Le CNRC dénie toute garantie +* expressed, implied, or énoncée, implicite ou légale, +* statutory, of any kind with de quelque nature que ce +* respect to the software, soit, concernant le logiciel, +* including without limitation y compris sans restriction +* any warranty of merchantability toute garantie de valeur +* or fitness for a particular marchande ou de pertinence +* purpose. NRC shall not be pour un usage particulier. +* liable in any event for any Le CNRC ne pourra en aucun cas +* damages, whether direct or être tenu responsable de tout +* indirect, special or general, dommage, direct ou indirect, +* consequential or incidental, particulier ou général, +* arising from the use of the accessoire ou fortuit, résultant +* software. Neither the name de l'utilisation du logiciel. Ni +* of the National Research le nom du Conseil National de +* Council of Canada nor the Recherches du Canada ni les noms +* names of its contributors may de ses participants ne peuvent +* be used to endorse or promote être utilisés pour approuver ou +* products derived from this promouvoir les produits dérivés +* software without specific prior de ce logiciel sans autorisation +* written permission. préalable et particulière +* par écrit. +* +* This file is part of the Ce fichier fait partie du projet +* OpenCADC project. OpenCADC. +* +* OpenCADC is free software: OpenCADC est un logiciel libre ; +* you can redistribute it and/or vous pouvez le redistribuer ou le +* modify it under the terms of modifier suivant les termes de +* the GNU Affero General Public la “GNU Affero General Public +* License as published by the License” telle que publiée +* Free Software Foundation, par la Free Software Foundation +* either version 3 of the : soit la version 3 de cette +* License, or (at your option) licence, soit (à votre gré) +* any later version. toute version ultérieure. +* +* OpenCADC is distributed in the OpenCADC est distribué +* hope that it will be useful, dans l’espoir qu’il vous +* but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE +* without even the implied GARANTIE : sans même la garantie +* warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ +* or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF +* PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence +* General Public License for Générale Publique GNU Affero +* more details. pour plus de détails. +* +* You should have received Vous devriez avoir reçu une +* a copy of the GNU Affero copie de la Licence Générale +* General Public License along Publique GNU Affero avec +* with OpenCADC. If not, see OpenCADC ; si ce n’est +* . pas le cas, consultez : +* . +* +************************************************************************ +*/ + +package org.opencadc.vospace.server.auth; + +import ca.nrc.cadc.auth.HttpPrincipal; +import ca.nrc.cadc.auth.NumericPrincipal; +import java.util.UUID; +import javax.security.auth.Subject; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.junit.Test; +import org.opencadc.vospace.ContainerNode; +import org.opencadc.vospace.NodeProperty; +import org.opencadc.vospace.VOS; + +/** + * + * @author pdowler + */ +public class VOSpaceAuthorizerTest { + private static final Logger log = Logger.getLogger(VOSpaceAuthorizerTest.class); + + public VOSpaceAuthorizerTest() { + } + + @Test + public void testAllocationOwner() { + NumericPrincipal n1 = new NumericPrincipal(UUID.randomUUID()); + HttpPrincipal h1 = new HttpPrincipal("somebody"); + Subject allocationOwner = new Subject(); + allocationOwner.getPrincipals().add(n1); + allocationOwner.getPrincipals().add(h1); + + Subject other = new Subject(); + other.getPrincipals().add(new NumericPrincipal(UUID.randomUUID())); + other.getPrincipals().add(new HttpPrincipal("other")); + + ContainerNode root = new ContainerNode(new UUID(0L, 0L), ""); + root.owner = new Subject(); + root.owner.getPrincipals().add(new NumericPrincipal(UUID.randomUUID())); + + ContainerNode home = new ContainerNode("home"); + home.parent = root; + home.owner = root.owner; + + ContainerNode alloc = new ContainerNode("alloc"); + alloc.parent = home; + alloc.owner = allocationOwner; + + ContainerNode sub1 = new ContainerNode("sub1"); + sub1.parent = alloc; + sub1.owner = other; + + ContainerNode sub2 = new ContainerNode("sub2"); + sub2.parent = sub1; + sub2.owner = other; + + final Subject caller = new Subject(); + final VOSpaceAuthorizer auth = new VOSpaceAuthorizer(); + + // no quota to denote an allocation + caller.getPrincipals().addAll(allocationOwner.getPrincipals()); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // owner of child nodes + caller.getPrincipals().clear(); + caller.getPrincipals().addAll(other.getPrincipals()); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // anon + caller.getPrincipals().clear(); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // random caller + caller.getPrincipals().add(new NumericPrincipal(UUID.randomUUID())); + caller.getPrincipals().add(new HttpPrincipal("caller")); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + alloc.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_QUOTA, "1234")); + + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // alloc owner + caller.getPrincipals().clear(); + caller.getPrincipals().add(h1); + Assert.assertTrue("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertTrue("sub1", auth.isAllocationOwner(sub1, caller)); + //Assert.assertTrue("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // root owner is never an alloc owner + caller.getPrincipals().clear(); + caller.getPrincipals().addAll(root.owner.getPrincipals()); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + Assert.assertFalse("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertFalse("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + + // this makes a parent allocation that includes the previous allocation + root.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_QUOTA, "1234")); + Assert.assertFalse("sub2", auth.isAllocationOwner(sub2, caller)); + Assert.assertFalse("sub1", auth.isAllocationOwner(sub1, caller)); + // here we bypass the alloc quota and see the root quota + // TODO: is this the right behaviour?? + Assert.assertTrue("alloc", auth.isAllocationOwner(alloc, caller)); + Assert.assertTrue("home", auth.isAllocationOwner(home, caller)); + Assert.assertFalse("root", auth.isAllocationOwner(root, caller)); + } +} From 8b9444a8f1f37d15bce67d3eb3ad78e661d55722 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 14:31:31 -0800 Subject: [PATCH 10/15] getAllocationHolders() -> getAllocationParents() --- .../main/java/org/opencadc/vospace/server/NodePersistence.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java index 44da1a31..f4e6d4d6 100644 --- a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java +++ b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java @@ -118,7 +118,7 @@ public interface NodePersistence { * * @return set of configured containers where allocations can be found */ - Set getAllocationHolders(); + Set getAllocationParents(); /** * Get the set of properties that are only writable by admins. From 2cc08470e5d6c9422c16a9f114689088dbf441d6 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Mon, 4 Mar 2024 16:38:39 -0800 Subject: [PATCH 11/15] change to NodePersistence.isAllocation(ContainerNode) complete cavern implementation --- .../vospace/server/NodePersistence.java | 18 ++--- cavern/README.md | 17 ++++- .../org/opencadc/cavern/CavernConfig.java | 39 +++++++--- .../nodes/FileSystemNodePersistence.java | 71 ++++++++++++++++--- .../org/opencadc/cavern/nodes/NodeUtil.java | 24 +++++++ .../opencadc/cavern/nodes/NodeUtilTest.java | 38 +++++++++- 6 files changed, 176 insertions(+), 31 deletions(-) diff --git a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java index f4e6d4d6..d4886a50 100644 --- a/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java +++ b/cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java @@ -71,15 +71,11 @@ import ca.nrc.cadc.io.ResourceIterator; import ca.nrc.cadc.net.TransientException; -import ca.nrc.cadc.util.FileMetadata; import java.net.URI; -import java.util.List; import java.util.Set; import org.opencadc.vospace.ContainerNode; -import org.opencadc.vospace.DataNode; import org.opencadc.vospace.Node; import org.opencadc.vospace.NodeNotSupportedException; -import org.opencadc.vospace.NodeProperty; import org.opencadc.vospace.server.transfers.TransferGenerator; /** @@ -109,16 +105,16 @@ public interface NodePersistence { ContainerNode getRootNode(); /** - * Get the set of container nodes that are the immediate parent of "allocations". - * Allocations are container nodes that belong to users. Use case 1: VOSpaceAuthorizer - * needs to identity allocations in order to grant allocation owner extra permissions - * to manage content in a multi-user/project environment. Use case 2: constrain the - * "create allocation" create node with different user) should be constrained to - * only happen in these container nodes. + * Determine if a container node is an "allocation". Allocations are container + * nodes that belong to users. + * Use case: VOSpaceAuthorizer needs to identity allocations in order to grant + * the allocation owner extra permissions to manage content in a multi-user/project + * environment. * + * @param node the container node to check * @return set of configured containers where allocations can be found */ - Set getAllocationParents(); + boolean isAllocation(ContainerNode node); /** * Get the set of properties that are only writable by admins. diff --git a/cavern/README.md b/cavern/README.md index 363d2e14..fa133ca1 100644 --- a/cavern/README.md +++ b/cavern/README.md @@ -54,6 +54,13 @@ A `cavern.properties` file in /config is required to run this service. The foll # service identity org.opencadc.cavern.resourceID = ivo://{authority}/{name} +# (optional) container nodes in the root are allocations: +org.opencadc.cavern.allocation = / + +# (optional) container nodes in /foo and /bar are allocations: +#org.opencadc.cavern.allocationParent = /foo +#org.opencadc.cavern.allocationParent = /bar + # base directory for cavern files org.opencadc.cavern.filesystem.baseDir = {persistent data directory in container} org.opencadc.cavern.filesystem.subPath = {relative path to the node/file content that could be mounted in other containers} @@ -68,13 +75,21 @@ org.opencadc.cavern.filesystem.rootOwner.gid = {gid} # (optional) keys to generate pre-auth URLs to cavern: now generated internally - # (optional) base directory exposed for sshfs mounts org.opencadc.cavern.sshfs.serverBase = {server}[:{port}]:{path} ``` The _resourceID_ is the resourceID of _this_ `cavern` service. +The _allocationParent_ is a path to a container node (directory) which contains space allocations. An allocation +is owned by a user (uisually different from the _rootOwner_ admin user) who is responsible for the allocation +and all conntent therein. The owner of an allocation is granted additional permissions within their +allocation (they can read/write/delete anything) so the owner cannot be blocked from access to any content +within their allocation. This probably only matters for multi-user projects. Multiple _allocationParent_(s) may +be configured to organise the top level of the content (e.g. /home and /projects). Paths configurted to be +_allocationParent_(s) will be automatically created (if necessary), owned by the _rootOwner_, and will be +anonymously readable (public). + The _filesystem.baseDir_ is the path to a base directory containing the `cavern` nodes/files. The _filesystem.subPath_ is the relative path to the node/file content that could be mounted in other containers. diff --git a/cavern/src/main/java/org/opencadc/cavern/CavernConfig.java b/cavern/src/main/java/org/opencadc/cavern/CavernConfig.java index 8cc7fe1b..a60a465e 100644 --- a/cavern/src/main/java/org/opencadc/cavern/CavernConfig.java +++ b/cavern/src/main/java/org/opencadc/cavern/CavernConfig.java @@ -80,6 +80,8 @@ import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; import javax.security.auth.Subject; import org.apache.log4j.Logger; @@ -101,7 +103,11 @@ public class CavernConfig { public static final String ROOT_OWNER_UID = CAVERN_KEY + ".filesystem.rootOwner.uid"; public static final String ROOT_OWNER_GID = CAVERN_KEY + ".filesystem.rootOwner.gid"; + public static final String ALLOCATION_PARENT = CAVERN_KEY + ".allocationParent"; + private final URI resourceID; + private final List allocationParents = new ArrayList<>(); + private final Path root; private final Path secrets; @@ -126,17 +132,14 @@ public CavernConfig() { boolean baseDirProp = checkProperty(mvp, sb, FILESYSTEM_BASE_DIR, true); boolean subPathProp = checkProperty(mvp, sb, FILESYSTEM_SUB_PATH, true); boolean rootOwnerProp = checkProperty(mvp, sb, ROOT_OWNER, true); - - //boolean privateKeyProp = checkProperty(mvp, sb, PRIVATE_KEY, false); - //boolean publicKeyProp = checkProperty(mvp, sb, PUBLIC_KEY, false); boolean sshfsServerBaseProp = checkProperty(mvp, sb, SSHFS_SERVER_BASE, false); - + boolean allocProp = checkProperty(mvp, sb, ALLOCATION_PARENT, false); + if (!resourceProp || !baseDirProp || !subPathProp || !rootOwnerProp) { - throw new IllegalStateException(sb.toString()); + throw new InvalidConfigException(sb.toString()); } String s = mvp.getFirstPropertyValue(RESOURCE_ID); - this.resourceID = URI.create(s); String baseDir = mvp.getFirstPropertyValue(CavernConfig.FILESYSTEM_BASE_DIR); String subPath = mvp.getFirstPropertyValue(CavernConfig.FILESYSTEM_SUB_PATH); @@ -144,13 +147,29 @@ public CavernConfig() { if (baseDir.endsWith("/") || subPath.startsWith("/")) { sep = ""; } - this.root = Paths.get(baseDir + sep + subPath); + this.root = Paths.get(baseDir, subPath); + this.resourceID = URI.create(s); + for (String sap : mvp.getProperty(ALLOCATION_PARENT)) { + String ap = sap; + if (ap.charAt(0) == '/') { + ap = ap.substring(1); + } + if (ap.length() > 0 && ap.charAt(ap.length() - 1) == '/') { + ap = ap.substring(0, ap.length() - 1); + } + if (ap.indexOf('/') >= 0) { + throw new InvalidConfigException("invalid " + ALLOCATION_PARENT + ": " + sap + + " reason: must be a top-level container node name"); + } + // empty string means root, otherwise child of root + allocationParents.add(ap); + } sep = "/"; if (baseDir.endsWith("/")) { sep = ""; } - this.secrets = Paths.get(baseDir + sep + "secrets"); + this.secrets = Paths.get(baseDir, "secrets"); } public URI getResourceID() { @@ -161,6 +180,10 @@ public Path getRoot() { return root; } + public List getAllocationParents() { + return allocationParents; + } + public Path getSecrets() { return secrets; } diff --git a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java index 84d15ee7..ebe527ba 100644 --- a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java +++ b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java @@ -83,6 +83,7 @@ import java.nio.file.LinkOption; import java.nio.file.Path; import java.util.Arrays; +import java.util.Comparator; import java.util.NoSuchElementException; import java.util.Set; import java.util.TreeSet; @@ -138,6 +139,7 @@ public class FileSystemNodePersistence implements NodePersistence { private final GroupCache groupCache; private final ContainerNode root; + private final Set allocationParents = new TreeSet<>(); private final Path rootPath; private final VOSURI rootURI; private final CavernConfig config; @@ -190,6 +192,56 @@ public FileSystemNodePersistence() { } this.groupCache = new GroupCache(posixMapper); this.localGroupsOnly = true; + + for (String ap : config.getAllocationParents()) { + if (ap.isEmpty()) { + // allocations are in root + allocationParents.add(root); + log.info("allocationParent: /"); + } else { + try { + + // simple top-level names only + ContainerNode cn = (ContainerNode) get(root, ap); + String str = ""; + if (cn == null) { + cn = new ContainerNode(ap); + cn.parent = root; + str = "created/"; + } + cn.isPublic = true; + cn.owner = root.owner; + cn.inheritPermissions = false; + put(cn); + allocationParents.add(cn); + log.info(str + "loaded allocationParent: /" + cn.getName()); + } catch (NodeNotSupportedException bug) { + throw new RuntimeException("BUG: failed to update isPublic=true on allocationParent " + ap, bug); + } + } + } + } + + // for use with allocationParents.add(node) and allocationParents.contains(node) + private class AbsoluteNodeComparator implements Comparator { + @Override + public int compare(Node n1, Node n2) { + if (n1 == null && n2 == null) { + throw new RuntimeException("BUG: two null args in comparator"); + } + // nulls last + if (n1 == null && n2 != null) { + return 1; + } + if (n1 != null && n2 == null) { + return -1; + } + int ret = 0; + + return ret; + + } + } // support FileAction @@ -217,10 +269,16 @@ public ContainerNode getRootNode() { } @Override - public Set getAllocationHolders() { - throw new UnsupportedOperationException("not implemented"); + public boolean isAllocation(ContainerNode cn) { + ContainerNode p = cn.parent; + for (ContainerNode ap : allocationParents) { + if (NodeUtil.absoluteEquals(p.parent, ap)) { + return true; + } + } + return false; } - + @Override public Set getAdminProps() { return ADMIN_PROPS; @@ -347,11 +405,8 @@ public Node put(Node node) throws NodeNotSupportedException, TransientException if (node == null) { throw new IllegalArgumentException("arg cannot be null: node"); } - if (node.parentID == null) { - if (node.parent == null) { - throw new RuntimeException("BUG: cannot persist node without parent: " + node); - } - node.parentID = node.parent.getID(); + if (node.parent == null) { + throw new RuntimeException("BUG: cannot persist node without parent: " + node); } if (node.ownerID == null) { if (node.owner == null) { diff --git a/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java b/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java index 68b54590..45d9ea7f 100644 --- a/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java +++ b/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java @@ -152,6 +152,30 @@ public NodeUtil(Path root, VOSURI rootURI, GroupCache groupCache) { this.groupCache = groupCache; } + /** + * Determine if two container nodes are the same. This is used + * to identify allocation nodes + * @param c1 a container + * @param c2 a container + * @return true if they are the same node + */ + public static boolean absoluteEquals(ContainerNode c1, ContainerNode c2) { + // note: cavern does not use/preserve Node.id except for root + if (!c1.getName().equals(c2.getName())) { + return false; + } + // same name, check parents + if (c1.parent == null && c2.parent == null) { + // both root + return true; + } + if (c1.parent == null || c2.parent == null) { + // one is root + return false; + } + return absoluteEquals(c1.parent, c2.parent); + } + public static Path nodeToPath(Path root, VOSURI uri) { assertNotNull("root", root); assertNotNull("uri", uri); diff --git a/cavern/src/test/java/org/opencadc/cavern/nodes/NodeUtilTest.java b/cavern/src/test/java/org/opencadc/cavern/nodes/NodeUtilTest.java index b05eacde..39553f7c 100644 --- a/cavern/src/test/java/org/opencadc/cavern/nodes/NodeUtilTest.java +++ b/cavern/src/test/java/org/opencadc/cavern/nodes/NodeUtilTest.java @@ -67,13 +67,45 @@ package org.opencadc.cavern.nodes; +import org.junit.Assert; +import org.junit.Test; +import org.opencadc.vospace.ContainerNode; + /** * * @author pdowler */ public class NodeUtilTest { - /** - * TODO: Some methods could be tested after some re-orgs - */ + + @Test + public void testAbsoluteEquals() { + ContainerNode root = new ContainerNode(""); + ContainerNode c1 = new ContainerNode("c1"); + c1.parent = root; + ContainerNode c2 = new ContainerNode("c2"); + c2.parent = root; + + ContainerNode cc1 = new ContainerNode("c1"); + cc1.parent = c1; + ContainerNode cc2 = new ContainerNode("c2"); + cc2.parent = c2; + + Assert.assertTrue(NodeUtil.absoluteEquals(root, root)); + Assert.assertTrue(NodeUtil.absoluteEquals(c1, c1)); + Assert.assertTrue(NodeUtil.absoluteEquals(c2, c2)); + Assert.assertTrue(NodeUtil.absoluteEquals(cc1, cc1)); + Assert.assertTrue(NodeUtil.absoluteEquals(cc2, cc2)); + + Assert.assertFalse(NodeUtil.absoluteEquals(root, c1)); + Assert.assertFalse(NodeUtil.absoluteEquals(c1, root)); + + Assert.assertFalse(NodeUtil.absoluteEquals(c1, c2)); // diff names + Assert.assertFalse(NodeUtil.absoluteEquals(c1, cc1)); // same name, diff parents + Assert.assertFalse(NodeUtil.absoluteEquals(c1, cc2)); // diff names, diff parents + Assert.assertFalse(NodeUtil.absoluteEquals(c2, c1)); // flip + Assert.assertFalse(NodeUtil.absoluteEquals(cc1, c1)); // flip + Assert.assertFalse(NodeUtil.absoluteEquals(cc2, c1)); // flip + + } } From 6ec82a3fb5d89e53012ef0613cc72b743529b431 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 5 Mar 2024 06:55:49 -0800 Subject: [PATCH 12/15] cavern: use DataNode.bytesUsed instead of node prop --- .../java/org/opencadc/cavern/files/HeadAction.java | 9 ++++----- .../main/java/org/opencadc/cavern/nodes/NodeUtil.java | 10 ++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/cavern/src/main/java/org/opencadc/cavern/files/HeadAction.java b/cavern/src/main/java/org/opencadc/cavern/files/HeadAction.java index fbebbb80..5b0d19f2 100644 --- a/cavern/src/main/java/org/opencadc/cavern/files/HeadAction.java +++ b/cavern/src/main/java/org/opencadc/cavern/files/HeadAction.java @@ -68,14 +68,11 @@ package org.opencadc.cavern.files; import ca.nrc.cadc.auth.AuthenticationUtil; -import ca.nrc.cadc.auth.HttpPrincipal; import ca.nrc.cadc.net.ResourceNotFoundException; import java.io.FileNotFoundException; -import java.io.OutputStream; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.AccessDeniedException; -import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.security.AccessControlException; @@ -84,6 +81,7 @@ import org.apache.log4j.Logger; import org.opencadc.permissions.ReadGrant; import org.opencadc.vospace.ContainerNode; +import org.opencadc.vospace.DataNode; import org.opencadc.vospace.LinkingException; import org.opencadc.vospace.Node; import org.opencadc.vospace.NodeNotFoundException; @@ -146,13 +144,14 @@ Path resolveAndSetMetadata() throws Exception { log.debug("container nodes not supported for GET"); throw new IllegalArgumentException("GET for directories not supported"); } - + DataNode dn = (DataNode) node; log.debug("node path resolved: " + node.getName()); log.debug("node type: " + node.getClass().getCanonicalName()); + syncOutput.setHeader("Content-Length", dn.bytesUsed); syncOutput.setHeader("Content-Disposition", "inline; filename=\"" + nodeURI.getName() + "\""); syncOutput.setHeader("Content-Type", node.getPropertyValue(VOS.PROPERTY_URI_TYPE)); syncOutput.setHeader("Content-Encoding", node.getPropertyValue(VOS.PROPERTY_URI_CONTENTENCODING)); - syncOutput.setHeader("Content-Length", node.getPropertyValue(VOS.PROPERTY_URI_CONTENTLENGTH)); + if (node.getPropertyValue(VOS.PROPERTY_URI_DATE) != null) { Date lastMod = NodeWriter.getDateFormat().parse(node.getPropertyValue(VOS.PROPERTY_URI_DATE)); syncOutput.setLastModified(lastMod); diff --git a/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java b/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java index 45d9ea7f..53513e8f 100644 --- a/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java +++ b/cavern/src/main/java/org/opencadc/cavern/nodes/NodeUtil.java @@ -456,8 +456,9 @@ Node pathToNode(Path p, boolean getAttrs) if (attrs.isDirectory()) { ret = new ContainerNode(p.getFileName().toString()); } else if (attrs.isRegularFile()) { - ret = new DataNode(p.getFileName().toString()); - // restore file-specific properties -- this is old and no longer know what it means + DataNode dn = new DataNode(p.getFileName().toString()); + dn.bytesUsed = attrs.size(); + ret = dn; } else if (attrs.isSymbolicLink()) { Path tp = Files.readSymbolicLink(p); Path abs = p.getParent().resolve(tp); @@ -493,10 +494,7 @@ Node pathToNode(Path p, boolean getAttrs) //ret.getProperties().add(new // NodeProperty(VOS.PROPERTY_URI_MODIFIED_DATE, df.format(modified))); ret.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_DATE, df.format(modified))); - if (attrs.isRegularFile()) { - ret.getProperties().add(new NodeProperty(VOS.PROPERTY_URI_CONTENTLENGTH, Long.toString(attrs.size()))); - } - + if (getAttrs && !attrs.isSymbolicLink()) { Map uda = ExtendedFileAttributes.getAttributes(p); for (Map.Entry me : uda.entrySet()) { From 46f04007e69ddee61b717252193d8a19989c4f34 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 5 Mar 2024 09:40:04 -0800 Subject: [PATCH 13/15] cavern: improve README --- cavern/README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cavern/README.md b/cavern/README.md index fa133ca1..d823ad71 100644 --- a/cavern/README.md +++ b/cavern/README.md @@ -54,12 +54,8 @@ A `cavern.properties` file in /config is required to run this service. The foll # service identity org.opencadc.cavern.resourceID = ivo://{authority}/{name} -# (optional) container nodes in the root are allocations: -org.opencadc.cavern.allocation = / - -# (optional) container nodes in /foo and /bar are allocations: -#org.opencadc.cavern.allocationParent = /foo -#org.opencadc.cavern.allocationParent = /bar +# (optional) identify which container nodes are allocations +org.opencadc.cavern.allocationParent = {top level node} # base directory for cavern files org.opencadc.cavern.filesystem.baseDir = {persistent data directory in container} @@ -86,9 +82,9 @@ is owned by a user (uisually different from the _rootOwner_ admin user) who is r and all conntent therein. The owner of an allocation is granted additional permissions within their allocation (they can read/write/delete anything) so the owner cannot be blocked from access to any content within their allocation. This probably only matters for multi-user projects. Multiple _allocationParent_(s) may -be configured to organise the top level of the content (e.g. /home and /projects). Paths configurted to be +be configured to organise the top level of the content (e.g. /home and /projects). Paths configured to be _allocationParent_(s) will be automatically created (if necessary), owned by the _rootOwner_, and will be -anonymously readable (public). +anonymously readable (public). Limitation: only a single level of top-level _allocationParent_(s) are supported. The _filesystem.baseDir_ is the path to a base directory containing the `cavern` nodes/files. From 61b712cc0557a3057d432524a5e95bac2ad5455e Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 5 Mar 2024 10:46:55 -0800 Subject: [PATCH 14/15] cavern: remove some cruft accidentally left in previous commit --- .../nodes/FileSystemNodePersistence.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java index ebe527ba..24c63207 100644 --- a/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java +++ b/cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java @@ -222,28 +222,6 @@ public FileSystemNodePersistence() { } } - // for use with allocationParents.add(node) and allocationParents.contains(node) - private class AbsoluteNodeComparator implements Comparator { - @Override - public int compare(Node n1, Node n2) { - if (n1 == null && n2 == null) { - throw new RuntimeException("BUG: two null args in comparator"); - } - // nulls last - if (n1 == null && n2 != null) { - return 1; - } - if (n1 != null && n2 == null) { - return -1; - } - int ret = 0; - - return ret; - - } - - } - // support FileAction public CavernConfig getConfig() { return config; @@ -270,6 +248,9 @@ public ContainerNode getRootNode() { @Override public boolean isAllocation(ContainerNode cn) { + if (cn.parent == null) { + return false; // root is never an allocation + } ContainerNode p = cn.parent; for (ContainerNode ap : allocationParents) { if (NodeUtil.absoluteEquals(p.parent, ap)) { From abc83d4e26db27abbe3a1a5b82c23b482cc3684c Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 5 Mar 2024 15:17:37 -0800 Subject: [PATCH 15/15] Update cavern/README.md Co-authored-by: Adrian --- cavern/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cavern/README.md b/cavern/README.md index d823ad71..8e3e7cb3 100644 --- a/cavern/README.md +++ b/cavern/README.md @@ -84,7 +84,7 @@ allocation (they can read/write/delete anything) so the owner cannot be blocked within their allocation. This probably only matters for multi-user projects. Multiple _allocationParent_(s) may be configured to organise the top level of the content (e.g. /home and /projects). Paths configured to be _allocationParent_(s) will be automatically created (if necessary), owned by the _rootOwner_, and will be -anonymously readable (public). Limitation: only a single level of top-level _allocationParent_(s) are supported. +anonymously readable (public). Limitation: only top-level container nodes can be configured as _allocationParent_(s). The _filesystem.baseDir_ is the path to a base directory containing the `cavern` nodes/files.