예제 #1
0
    def generate_stream(self):
        p = self.generate_platform()

        o = Organisation()
        o.id = p.organisations[0].id

        g = Group()
        g.id = p.groups[0].id

        s = Stream()
        s.id = "{0}_location".format(self.new_stream_id)

        s.groups = [g]
        s.organisations = [o]

        s.result_type = StreamResultType.geolocation

        s.samplePeriod = 'PT10S'
        s.reportingPeriod = 'P1D'

        sm = StreamMetaData()
        sm.type = StreamMetaDataType.geolocation
        sm.interpolation_type = InterpolationType.continuous

        s.metadata = sm

        return s, p
예제 #2
0
    def generate_stream(self):
        p = self.generate_platform()

        o = Organisation()
        o.id = p.organisations[0].id

        g = Group()
        g.id = p.groups[0].id

        s = Stream()
        s.id = "{0}_location".format(self.new_stream_id)

        s.groups = [g]
        s.organisations = [o]

        s.result_type = StreamResultType.geolocation

        s.samplePeriod = 'PT10S'
        s.reportingPeriod = 'P1D'

        sm = StreamMetaData()
        sm.type = StreamMetaDataType.geolocation
        sm.interpolation_type = InterpolationType.continuous

        s.metadata = sm

        return s, p
예제 #3
0
    def generate_platform(self):
        o = Organisation()
        o.id = "utas"

        g = Group()
        g.id = "ionata_sandbox"

        p = Platform()
        p.id = "test_platform_{0}".format(self.new_platform_id)
        p.name = "A Platform create for unittests"
        p.organisations = [o]
        p.groups = [g]
        return p
예제 #4
0
    def generate_platform(self):
        o = Organisation()
        o.id = "utas"

        g = Group()
        g.id = "ionata_sandbox"

        p = Platform()
        p.id = "test_platform_{0}".format(self.new_platform_id)
        p.name = "A Platform create for unittests"
        p.organisations = [o]
        p.groups = [g]
        return p