Beispiel #1
0
    def test_get_object_schema(self):

        schema = get_object_schema('InstrumentSite')
        self.assertEqual(len(schema['schemas']), 6)
        self.assertItemsEqual([k for k,v in schema['schemas'].iteritems()], ['InstrumentSite', 'PlatformPort', 'GeospatialCoordinateReferenceSystem', 'GeospatialIndex', 'SiteEnvironmentType', 'ResourceVisibilityEnum'])

        #Loop through all of the schemas and get them too.
        for k, v in schema['schemas'].iteritems():
            sub_schema = get_object_schema(k)
Beispiel #2
0
    def xtest_get_object_schema(self):

        schema = get_object_schema('InstrumentSite')
        self.assertEqual(len(schema['schemas']), 6)
        self.assertItemsEqual([k for k, v in schema['schemas'].iteritems()], [
            'InstrumentSite', 'PlatformPort',
            'GeospatialCoordinateReferenceSystem', 'GeospatialIndex',
            'SiteEnvironmentType', 'ResourceVisibilityEnum'
        ])

        #Loop through all of the schemas and get them too.
        for k, v in schema['schemas'].iteritems():
            sub_schema = get_object_schema(k)
def get_resource_schema(resource_type):
    try:
        #Validate requesting user and expiry and add governance headers
        ion_actor_id, expiry = get_governance_info_from_request()
        ion_actor_id, expiry = validate_request(ion_actor_id, expiry)

        return gateway_json_response(get_object_schema(resource_type))

    except Exception as e:
        return build_error_response(e)
    def get_resource_schema(self, resource_type):
        try:
            # Validate requesting user and expiry and add governance headers
            ion_actor_id, expiry = self.get_governance_info_from_request()
            ion_actor_id, expiry = self.validate_request(ion_actor_id, expiry)

            return self.gateway_json_response(get_object_schema(resource_type))

        except Exception as ex:
            return self.gateway_error_response(ex)
Beispiel #5
0
    def xtest_get_object_schema(self):

        schema = get_object_schema("InstrumentSite")
        self.assertEqual(len(schema["schemas"]), 6)
        self.assertItemsEqual(
            [k for k, v in schema["schemas"].iteritems()],
            [
                "InstrumentSite",
                "PlatformPort",
                "GeospatialCoordinateReferenceSystem",
                "GeospatialIndex",
                "SiteEnvironmentType",
                "ResourceVisibilityEnum",
            ],
        )

        # Loop through all of the schemas and get them too.
        for k, v in schema["schemas"].iteritems():
            sub_schema = get_object_schema(k)