Skip to content

Commit

Permalink
Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerdahl committed Aug 10, 2020
1 parent 83a619c commit dfab267
Show file tree
Hide file tree
Showing 72 changed files with 851 additions and 898 deletions.
1 change: 1 addition & 0 deletions lib_client/src/d1_client/tests/test_cnclient_2_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import d1_test.d1_test_case
import d1_test.instance_generator.sciobj
import d1_test.mock_api.catch_all
import requests


@d1_test.d1_test_case.reproducible_random_decorator("TestCNClient20")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="42" replicationAllowed="true">
<replicationPolicy replicationAllowed="true" numberReplicas="42">
<preferredMemberNode>preferred-mn-2</preferredMemberNode>
<blockedMemberNode>blocked-mn-1</blockedMemberNode>
<blockedMemberNode>blocked-mn-2</blockedMemberNode>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<ns1:objectList count="100" start="0" total="100" xmlns:ns1="http://ns.dataone.org/service/types/v1">
<ns1:objectList xmlns:ns1="http://ns.dataone.org/service/types/v1" count="100" start="0" total="100">
<objectInfo>
<identifier>object#0000</identifier>
<formatId>application/msword</formatId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<preferredMemberNode>mn_hd</preferredMemberNode>
<preferredMemberNode>mn_i</preferredMemberNode>
<preferredMemberNode>mn_i</preferredMemberNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="3" replicationAllowed="true">
<replicationPolicy replicationAllowed="true" numberReplicas="3">
<preferredMemberNode>node1</preferredMemberNode>
<preferredMemberNode>node2</preferredMemberNode>
<preferredMemberNode>node3</preferredMemberNode>
Expand Down Expand Up @@ -60,4 +60,4 @@
<property name="property_name_3">property_value_3</property>
</mediaType>
<fileName>string</fileName>
</ns1:systemMetadata>
</ns1:systemMetadata>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<ns1:objectList count="100" start="0" total="100" xmlns:ns1="http://ns.dataone.org/service/types/v1">
<ns1:objectList xmlns:ns1="http://ns.dataone.org/service/types/v1" count="100" start="0" total="100">
<objectInfo>
<identifier>object#0000</identifier>
<formatId>application/msword</formatId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<ns1:objectList count="100" start="0" total="100" xmlns:ns1="http://ns.dataone.org/service/types/v1">
<ns1:objectList xmlns:ns1="http://ns.dataone.org/service/types/v1" count="100" start="0" total="100">
<objectInfo>
<identifier>object#0000</identifier>
<formatId>application/msword</formatId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
> HTTP-Version: HTTP/1.1
> HTTP/? 404 Not Found

<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="/templates/home.xsl"?><error detailCode="0"
errorCode="404" name="NotFound" nodeId="urn:node:GMNUnitTestInstance"><description>Invalid API endpoint</description></error>
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="/templates/home.xsl"?><error name="NotFound"
errorCode="404" detailCode="0" nodeId="urn:node:GMNUnitTestInstance"><description>Invalid API endpoint</description></error>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
> HTTP-Version: HTTP/1.1
> HTTP/? 404 Not Found

<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="/templates/home.xsl"?><error detailCode="0"
errorCode="404" name="NotFound" nodeId="urn:node:GMNUnitTestInstance"><description>Invalid API endpoint</description></error>
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="/templates/home.xsl"?><error name="NotFound"
errorCode="404" detailCode="0" nodeId="urn:node:GMNUnitTestInstance"><description>Invalid API endpoint</description></error>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
{
"Content-Type": "text/xml"
},
"<?xml version=\"1.0\" encoding=\"utf-8\"?><error detailCode=\"0\" errorCode=\"413\"
name=\"InsufficientResources\"><description></description></error>"
"<?xml version=\"1.0\" encoding=\"utf-8\"?><error name=\"InsufficientResources\" errorCode=\"413\"
detailCode=\"0\"><description></description></error>"
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
{
"Content-Type": "text/xml"
},
"<?xml version=\"1.0\" encoding=\"utf-8\"?><error detailCode=\"0\" errorCode=\"413\"
name=\"InsufficientResources\"><description></description></error>"
"<?xml version=\"1.0\" encoding=\"utf-8\"?><error name=\"InsufficientResources\" errorCode=\"413\"
detailCode=\"0\"><description></description></error>"
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<permission>read</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false"/>
<replicationPolicy replicationAllowed="false" numberReplicas="0"/>
<archived>false</archived>
<dateUploaded>1988-05-01T00:00:00Z</dateUploaded>
<dateSysMetadataModified>1988-05-01T00:00:00Z</dateSysMetadataModified>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<error detailCode="123.456.789" errorCode="500" name="ServiceFailure">
<error name="ServiceFailure" errorCode="500" detailCode="123.456.789">
<description>test description</description>
</error>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" ?>
<error detailCode="123" errorCode="500" name="ServiceFailure"/>
<error name="ServiceFailure" errorCode="500" detailCode="123"/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<error detailCode="123.456.789" errorCode="500" name="ServiceFailure">
<error name="ServiceFailure" errorCode="500" detailCode="123.456.789">
<description>test description</description>
<traceInformation>test traceInformation</traceInformation>
</error>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" ?>
<ns1:node replicate="false" state="up" synchronize="true" type="cn" xmlns:ns1="http://ns.dataone.org/service/types/v1">
<ns1:node replicate="false" synchronize="true" type="cn" state="up" xmlns:ns1="http://ns.dataone.org/service/types/v1">
<identifier>urn:node:NODEID</identifier>
<name>Name of Node</name>
<description>Description of node.</description>
<baseURL>http://www.any.org/ventos/verrantque</baseURL>
<services>
<service available="true" name="MNCore" version="v1"/>
<service available="true" name="MNRead" version="v1"/>
<service available="false" name="MNAuthorization" version="v1"/>
<service available="false" name="MNStorage" version="v1"/>
<service available="false" name="MNReplication" version="v1">
<service name="MNCore" version="v1" available="true"/>
<service name="MNRead" version="v1" available="true"/>
<service name="MNAuthorization" version="v1" available="false"/>
<service name="MNStorage" version="v1" available="false"/>
<service name="MNReplication" version="v1" available="false">
<restriction methodName="string">
<subject>string</subject>
</restriction>
Expand All @@ -29,7 +29,7 @@
<allowedObjectFormat>http://www.isotc211.org/2005/gmd</allowedObjectFormat>
<allowedObjectFormat>eml://ecoinformatics.org/eml-2.1.1</allowedObjectFormat>
</nodeReplicationPolicy>
<ping lastSuccess="2002-06-24T15:46:32Z" success="false"/>
<ping success="false" lastSuccess="2002-06-24T15:46:32Z"/>
<subject>subjectStringA</subject>
<subject>subjectStringB</subject>
<contactSubject>contactSubjectA</contactSubject>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" ?>
<ns1:node replicate="false" state="up" synchronize="true" type="cn" xmlns:ns1="http://ns.dataone.org/service/types/v2.0">
<ns1:node replicate="false" synchronize="true" type="cn" state="up" xmlns:ns1="http://ns.dataone.org/service/types/v2.0">
<identifier>urn:node:NODEID</identifier>
<name>Name of Node</name>
<description>Description of node.</description>
<baseURL>http://www.any.org/ventos/verrantque</baseURL>
<services>
<service available="true" name="MNCore" version="v1"/>
<service available="true" name="MNRead" version="v1"/>
<service available="true" name="MNAuthorization" version="v1"/>
<service available="true" name="MNStorage" version="v1"/>
<service available="true" name="MNReplication" version="v1"/>
<service available="true" name="MNCore" version="v2"/>
<service available="true" name="MNRead" version="v2"/>
<service available="true" name="MNAuthorization" version="v2"/>
<service available="true" name="MNStorage" version="v2"/>
<service available="true" name="MNReplication" version="v2">
<service name="MNCore" version="v1" available="true"/>
<service name="MNRead" version="v1" available="true"/>
<service name="MNAuthorization" version="v1" available="true"/>
<service name="MNStorage" version="v1" available="true"/>
<service name="MNReplication" version="v1" available="true"/>
<service name="MNCore" version="v2" available="true"/>
<service name="MNRead" version="v2" available="true"/>
<service name="MNAuthorization" version="v2" available="true"/>
<service name="MNStorage" version="v2" available="true"/>
<service name="MNReplication" version="v2" available="true">
<restriction methodName="string">
<subject>string</subject>
</restriction>
Expand All @@ -34,7 +34,7 @@
<allowedObjectFormat>http://www.isotc211.org/2005/gmd</allowedObjectFormat>
<allowedObjectFormat>eml://ecoinformatics.org/eml-2.1.1</allowedObjectFormat>
</nodeReplicationPolicy>
<ping lastSuccess="2002-06-24T15:46:32Z" success="false"/>
<ping success="false" lastSuccess="2002-06-24T15:46:32Z"/>
<subject>subjectStringA</subject>
<subject>subjectStringB</subject>
<contactSubject>contactSubjectA</contactSubject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sysmeta: <?xml version="1.0" ?>
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<blockedMemberNode>mn_b</blockedMemberNode>
<blockedMemberNode>mn_o</blockedMemberNode>
</replicationPolicy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sysmeta: <?xml version="1.0" ?>
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<blockedMemberNode>mn_b</blockedMemberNode>
<blockedMemberNode>mn_o</blockedMemberNode>
</replicationPolicy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<preferredMemberNode>mn_fw</preferredMemberNode>
<preferredMemberNode>mn_g</preferredMemberNode>
<preferredMemberNode>mn_r</preferredMemberNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<preferredMemberNode>mn_fw</preferredMemberNode>
<preferredMemberNode>mn_g</preferredMemberNode>
<preferredMemberNode>mn_r</preferredMemberNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<permission>read</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="7" replicationAllowed="true">
<replicationPolicy replicationAllowed="true" numberReplicas="7">
<preferredMemberNode>mn_se</preferredMemberNode>
</replicationPolicy>
<archived>false</archived>
Expand Down Expand Up @@ -48,7 +48,7 @@
<permission>write</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="6" replicationAllowed="true">
<replicationPolicy replicationAllowed="true" numberReplicas="6">
<preferredMemberNode>mn_b</preferredMemberNode>
<preferredMemberNode>mn_q</preferredMemberNode>
<preferredMemberNode>mn_q</preferredMemberNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<permission>changePermission</permission>
</allow>
</accessPolicy>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<preferredMemberNode>mn_f</preferredMemberNode>
<preferredMemberNode>mn_iu</preferredMemberNode>
<blockedMemberNode>mn_s</blockedMemberNode>
Expand Down Expand Up @@ -84,7 +84,7 @@
<checksum algorithm="SHA-1">83c44b509ad842b77d48cb3e58c84c89a40991e5</checksum>
<submitter>subj_wa</submitter>
<rightsHolder>subj_fw</rightsHolder>
<replicationPolicy numberReplicas="0" replicationAllowed="false">
<replicationPolicy replicationAllowed="false" numberReplicas="0">
<preferredMemberNode>mn_b</preferredMemberNode>
<preferredMemberNode>mn_ys</preferredMemberNode>
<blockedMemberNode>mn_ba</blockedMemberNode>
Expand Down
Loading

0 comments on commit dfab267

Please sign in to comment.