Hi Jeff,
This seems a very good step forward. I suggest that we all share the primer internally with our CIMI reps, first. When we have something more complete, we can consider how to cycle this back
to CIMI WG for comment. How far along would you characterize our work to date?
Thanks,
Paul
Paul Lipton
CA Technologies
VP, Industry Standards and Open Source
Member, CA Council for Technical Excellence
Office Phone: +1 609 583-9718
Mobile: +1 267 987-6887
Email:
THIS MESSAGE MAY CONTAIN CONFIDENTIAL, PRIVILEGED OR OTHER LEGALLY PROTECTED INFORMATION. IT IS INTENDED FOR THE ADDRESSEE ONLY. IF YOU ARE NOT THE ADDRESSEE
(OR SOMEONE THE ADDRESSEE AUTHORIZED TO RECEIVE THIS MESSAGE), YOU ARE PROHIBITED FROM COPYING, DISTRIBUTING OR OTHERWISE USING IT. PLEASE NOTIFY THE SENDER AND RETURN IT AT OUR COST. THANK YOU.
From: [mailto:]
On Behalf Of Vaught, Jeffrey A
Sent: Monday, November 07, 2011 11:13 AM
To:
Subject: [saf] SAF Primer
More work completed on the DMTF CIMI section of the Primer.
The example below defines a Protocol (instead of just the Prescription), as ultimately that is what a CIMI SAF Catalog would include.
I think it is still valuable to see what the Prescription would look like, as well as defining a sample Symptom (shown at the bottom).
Next steps
-
Provide example where CIMI monitor generates Symptoms and we provide Syndromes to detect.
-
Setup a meeting with CIMI folks to discuss our progress.
Fyi – I will post to Oasis site (along with latest spec revisions) in a day or so.
<Protocol>
<ProtocolType>
<Uri>http://saf.com/types/protocols/compute_provision_increase</Uri>
</ProtocolType>
<PrescriptionType>
<Uri>http://saf.com/types/prescriptions/compute_provision_increase</Uri>
</PrescriptionType>
<ProtocolName>ProvisionAdditionalVMs</ProtocolName>
<Description>Provision additional virtual machines</Description>
<Effectiveness>Effective</Effectiveness>
<Risk>Moderate</Risk>
<Duration>Moderate</Duration>
<Function>Preventative</Function>
<Directive>
for $x in /Symptoms/Symptom
let $client_id := $x/Subject
let $change_percentage := fn:number($x/Content/SalesProjection/PercentageIncrease)
return
<Details>
<ClientID>$client_id</ClientID>
<ChangePercentage>$change_percentage</ChangePercentage>
<Details>
</Directive>
<PotentialSyndromes />
<Process>
#ruby
# arguments: $client.id, $change.percentage
# get current machines
get_response = RestClient.get(“http://saf.com/cimi/” + $client.id + “machines”)
# response resembles below
#<MachineCollection>
# <uri>http://saf.com/cimi/12345/machines</uri>
# <name>mymachines</name>
# <description>my machines</description>
# <created>2011-10-04T11:28:00</created>
# <machine href="" href="http://saf.com/cimi/12345/machine/mymachine1">http://saf.com/cimi/12345/machine/mymachine1” />
# <machine href="" href="http://saf.com/cimi/12345/machine/mymachine2">http://saf.com/cimi/12345/machine/mymachine2” />
# <machine href="" href="http://saf.com/cimi/12345/machine/mymachine3">http://saf.com/cimi/12345/machine/mymachine3” />
# <machine href="" href="http://saf.com/cimi/12345/machine/mymachine4">http://saf.com/cimi/12345/machine/mymachine4” />
# <operation rel=”add” href="" href="http://saf.com/cimi/12345/machines">http://saf.com/cimi/12345/machines” />
#</MachineCollection>
# determine number of additional machines required
$client_uri = “http://saf.com/cimi/” + $client.id + “machines”
$machine_count = XPath(count(response/MachineCollection[$client_uri]/machine
$new_machine_count = $machine_count * (1 + $change.percentage/100)
# add more capacity
do
begin
body = {
<MachineCreate>
<name>mymachineXXXXXX</name>
<machineTemplate href="" href="http://saf.com/cimi/">http://saf.com/cimi/” + $client.id + “machineTemplates/LinuxTemplate” />
</MachineCreate>
}
RestClient.post(get_response/MachineCollection/operation[@rel=’add’]/@href, body)
end
$new_machine_count = $new_machine_count - 1
while $new_machine_count >= 0
</Process>
</Protocol>
<!—The diagnostician creates the Prescription (instance) from the Protocol and participating Symptoms -->
<Prescription>
<PrescriptionId>http://saf.com/prescriptions/001</PrescriptionId>
<PrescriptionType> http://saf.com/types/prescriptions/ compute_provision_increase </PrescriptionType>
<ExpirationDate>2010-03-25T13:45</ExpirationDate>
<Arguments>
<Details>
<ClientID>http://saf.com/subjects/client-12345</ClientID>
<ChangePercentage>10</ChangePercentage>
</Details>
</Arguments>
<Process>
Same as above, in Protocol
</Process>
</Prescription>
<!—An example Symptom -->
<Symptom>
<SymptomId>http://saf.com/symptoms/salesprojection/1</SymptomId>
<SymptomType>
<Uri>http://saf.com/types/symptom/salesprojection</Uri>
</SymptomType>
<CreationDate>2011-10-24T13:10:05</CreationDate>
<Confidence>High</Confidence>
<Reporter>http://saf.com/reporters/salessensor-123</Reporter>
<Subject>http://saf.com/subjects/client-12345</Subject>
<ExpirationDate />
<RelatedSymptoms />
<Incident />
<Content>
<SalesProjection>
<Region>Global</Region>
<PercentageIncrease>10</PercentageIncrease>
</SalesProjection>
</Content>
</Symptom>