SeaCloudsEU / SeaCloudsPlatform

Seamless adaptive multi-cloud management of service-based applications
http://www.seaclouds-project.eu/
Apache License 2.0
18 stars 20 forks source link

Adds penalties API and display of penalties in dashboard #302

Closed rosogon closed 8 years ago

rosogon commented 8 years ago

A new REST endpoint is added to retrieve the penalties associated to an (agreement, term) pair.

The web application adds a new table in SLA tab that displays the penalties for a term (under violations table).

kiuby88 commented 8 years ago

@rosogon update your PR

rosogon commented 8 years ago

To test the feature, you have to add business penalties to the agreement in the last step.

Add the element BusinessValueList after ServiceLevelObjective to the availability term:

      <wsag:GuaranteeTerm wsag:Name="appAvailableSLARule___softcare-gui">
        <wsag:ServiceScope wsag:ServiceName="service">softcare-gui</wsag:ServiceScope>
        <wsag:ServiceLevelObjective>[...]
        </wsag:ServiceLevelObjective>
        <wsag:BusinessValueList>
          <wsag:CustomBusinessValue>
            <sla:Penalty type="discount" expression="35" unit="%" validity="P1D"/>
          </wsag:CustomBusinessValue>
          <wsag:CustomBusinessValue count="5" duration="P1D">
            <sla:Penalty type="service" expression="sms" validity="P1M"/>
          </wsag:CustomBusinessValue>
        </wsag:BusinessValueList>
      </wsag:GuaranteeTerm>

Once the application is deployed, you can simply stop the application (directly in CF, f.e.). Go to SLA-availability tab and check the violations and penalties there.

kiuby88 commented 8 years ago

LGTM +1

Thanks for that