Esempio n. 1
0
    def setUp(self):
        conv = xmlconverter.AgreementConverter()
        self.agreement = xmlconverter.convertfile(
            conv, "slagui/testing/agreement.xml")
        """:type : Agreement"""

        self.status = self._new_agreementstatus(
            VIOLATED,
            [ ("GT_ResponseTime", FULFILLED),
              ("GT_Performance", VIOLATED) ]
        )

        self.emptystatus = self._new_agreementstatus(
            NON_DETERMINED,
            [ ("GT_ResponseTime", NON_DETERMINED),
              ("GT_Performance", NON_DETERMINED) ]
        )

        self.violations = [
            self._new_violation("Performance"),
            self._new_violation("Performance"),
            self._new_violation("Performance")
        ]

        self.checkviolations = {
            "GT_Performance": 3,
            "GT_ResponseTime": 0
        }

        self.emptycheckviolations = {
            "GT_Performance": 0,
            "GT_ResponseTime": 0
        }
        self.annotator = AgreementAnnotator()
Esempio n. 2
0
    def test_template(self):
        conv = xmlconverter.AgreementConverter()

        out = xmlconverter.convertfile(conv, "slaclient/tests/template.xml")
        """:type : Template"""

        self.assertEquals("template02", out.template_id)
        self.assertEquals("RandomClient", out.context.consumer)
        self.assertEquals("provider-prueba", out.context.provider)
        self.assertEquals("ExampleService", out.context.service)
Esempio n. 3
0
	def test_template(self):
		conv = xmlconverter.AgreementConverter()

		out = xmlconverter.convertfile(conv, "slaclient/tests/template.xml")
		""":type : Template"""

		self.assertEquals("template02", out.template_id)
		self.assertEquals("RandomClient", out.context.consumer)
		self.assertEquals("provider-prueba", out.context.provider)
		self.assertEquals("ExampleService", out.context.service)
Esempio n. 4
0
	def test_agreement(self):
		conv = xmlconverter.AgreementConverter()

		out = xmlconverter.convertfile(conv, "slaclient/tests/agreement.xml")
		""":type : Agreement"""

		self.assertEquals("agreement02", out.agreement_id)
		self.assertEquals("RandomClient", out.context.consumer)
		self.assertEquals("provider-prueba", out.context.provider)
		self.assertEquals("template-2007-12-04", out.context.template_id)
		self.assertEquals("ExampleService", out.context.service)
Esempio n. 5
0
    def test_agreement(self):
        conv = xmlconverter.AgreementConverter()

        out = xmlconverter.convertfile(conv, "slaclient/tests/agreement.xml")
        """:type : Agreement"""

        self.assertEquals("agreement02", out.agreement_id)
        self.assertEquals("RandomClient", out.context.consumer)
        self.assertEquals("provider-prueba", out.context.provider)
        self.assertEquals("template-2007-12-04", out.context.template_id)
        self.assertEquals("ExampleService", out.context.service)
Esempio n. 6
0
    def test_agreement(self):
        conv = xmlconverter.AgreementConverter()

        out = xmlconverter.convertfile(conv, "slaclient/tests/agreement.xml")
        """:type : Agreement"""

        self.assertEquals("agreement02", out.agreement_id)
        self.assertEquals("RandomClient", out.context.consumer)
        self.assertEquals("provider-prueba", out.context.provider)
        self.assertEquals("template-2007-12-04", out.context.template_id)
        self.assertEquals("ExampleService", out.context.service)
        csl = \
            out.guaranteeterms["login"].servicelevelobjective.customservicelevel
        self.assertEquals(10000, csl.maxvalue)
        self.assertEquals(float("-inf"), csl.minvalue)

        pprint(out)
Esempio n. 7
0
    def test_agreement(self):
        conv = xmlconverter.AgreementConverter()

        out = xmlconverter.convertfile(conv, "slaclient/tests/agreement.xml")
        """:type : Agreement"""

        self.assertEquals("agreement02", out.agreement_id)
        self.assertEquals("RandomClient", out.context.consumer)
        self.assertEquals("provider-prueba", out.context.provider)
        self.assertEquals("template-2007-12-04", out.context.template_id)
        self.assertEquals("ExampleService", out.context.service)
        csl = \
            out.guaranteeterms["login"].servicelevelobjective.customservicelevel
        self.assertEquals(10000, csl.maxvalue)
        self.assertEquals(float("-inf"), csl.minvalue)

        pprint(out)
Esempio n. 8
0
    def test_agreement(self):
        conv = xmlconverter.AgreementConverter()

        out = xmlconverter.convertfile(conv, "slagui/testing/agreement.xml")
        """:type : Agreement"""