Provider tools
Component description
The "Provider tools" are the command line tools used by Cloud Providers to insert new Products, new SLA Templates, new Product Offers, new Type of Guarantee, into the repository and to approve a party (typically, the Customer) after its creation.
Prerequisites for Provider Tools usage
The following prerequisites must be satisfied in order to use the Provider tools:
- An up & running SLA@SOI platform, in the version customized for Contrail
Public API - Provider Tools
List of Provider tools sections:
- AddProduct
2. AddTemplate
3. AddProductOffer
4. GetTemplate
5. GetTemplateList
6. GetProductList
7. ApproveParty
8. AddUnitResource
9. AddFixedFee
10.AddVariableFee
11.AddCompoundFee
12.AddGuarantee
13.AssociatePrice
14.AssociateGuarantee
15.Delete*Resource*
While tools 1,2,3,7,8,9,10,11,12,13,14 and 15 have effects in the SLA@SOI DB (inserts/updates/delete), tools 4,5,6 are used to read contents only.
AddProduct
Description
It adds a new product into a repository; this product will be uniquely identified by id into database. Some parameters are mandatory.
Parameters
- -b arg: Product brand.
- -c arg: Product category.
- -d arg: Product description.
- -df arg: The date (format: YYYYMMDD; default: today) the product offer is valid from.
- -di arg: The date (format: YYYYMMDD; default: today) when the product offer is inserted.
- -dt arg: The date (format: YYYYMMDD; default: 2 years later) the product offer is valid to.
- -mp arg: Maximum price that can be assigned to the product.
- -mpa arg: Max penalties that can be assigned to the product in case of SLA termination.
- -mpc arg: Max penalties that can be assigned to the product for .
- -mpr arg: Max penalties that can be assigned to the product to remove.
- -n arg:Product name.
- -nt arg:Negotiation type (default: 'A')
- -p arg:ID in the database, uniquely identifying the party, assigned at the time of its creation.
- -r arg:Release (default: 1.0)
- -s arg:Status (default: 'A')
- -ur arg:Unsuccessfull rounds
Some of these values may be omitted, and therefore will be assigned default values.
Return Value
- productId: The ID of the new product.
Request example
Response example
AddTemplate
Description
It adds a new SLA template into a SLA Template registry (Business SLAM registry, or Software SLAM regitry or Infrastructure SLAM registry), and it will be uniquely identified by an ID into the database.
Parameters
- -d arg: SLA Template description.
- -p arg: Provider ID in the database, assigned at the time of its creation.
- -r arg: Register name.
- -slam arg: SLA@SOI SLAM DB [BSLAM (default) | SSLAM | ISLAM].It defines the database in which will be inserted the template.
- -t arg: The file that contain the SLA template. If it is not in the Provider Tools directory, you must specify the file path.
Some of these values may be omitted, and therefore will be assigned default values.
Return Value
- templateId: The ID of the new template.
Request example
Response example
AddProductOffer
Description
To add a new product offer, the Provider can use the AddProductOffer program;
this creates an association between a product and a SLA template.
Parameters
- -b arg: Billing Frequency ID. If a valued is not specified, the default is 1.
- -d arg: Product offer description.
- -df arg:The date (format: YYYYMMDD; default: today) the product offer is valid from.
- -di arg:The date (format: YYYYMMDD; default: today) when the product offer is inserted.
- -dt arg:The date (format: YYYYMMDD; default: 2 years later) when the product offer expires.
- -n arg: Product Offer name.
- -p arg: ID in the database, uniquely identifying the product, assigned at the time of its creation.
- -pa arg:ID in the database, uniquely identifying the party, assigned at the time of its creation.
- -r arg: Revision ID (default: 1.0)
- -s arg: Status (default: 'A')
- -t arg: ID in the database, uniquely identifying the SLA Template, assigned when it's entered into the database.
Some of these values may be omitted, and therefore will be assigned default values.
Return Value
- productOfferd: The ID of the new prioduct offer.
Request example
./AddProductOffer.sh -d ProductOfferDescription -n ProductOffernName -p 9 -pa 465 -t CT-Contrail-new-SLAT-8-NoVariable
This way AddProductOffer will create an association between the product having ID=9 and the SLA template identified by ID=CT-Contrail-new-SLAT-8-NoVariable, for party with ID=465.
Response example
GetTemplate
Description
GetTemplate displays a template, given its ID and the registry (if not specified, the template will be searched into the Business SLA Manager registry).
Parameters
- -slam arg: SLA@SOI SLAM DB [BSLAM (default) | SSLAM | ISLAM]. It defines the database in which search the template.
- -t arg: Template ID in the database, uniquely identifying the Template.
Some of these values may be omitted, and therefore will be assigned default values.
Return Value
- template: The requested template in SLA@SOI syntax.
Request example
Response example
GetTemplateList
Description
It shows the list of templates defined in the input registry -or defaults to the registry BSLAM- associated to a product identified by an input id.
Parameters
- -host arg: SLA@SOI host (default: localhost)
- -p arg: Product ID in the database, assigned at the time of its creation.
- -port arg: SLA@SOI port (default: 8080)
- -slam arg: SLA@SOI SLAM DB [BSLAM (default) | SSLAM | ISLAM]. It defines the database in which to search.
Some of these values may be omitted, and therefore will be assigned default values.
Return Value
- template list: The list of template in SLA@SOI syntax.
Request example
./GetTemplateList.sh -p 9
This will diplay the list of templates associated to the product with ID=9.
Response example
GetProductList
Description
GetProductList shows the list of products present in the repository.
Parameters
none
Return Value
- products list: The list of products, with their information.
Request example
Response example
ApproveParty
Description
After a party (Customer or Provider) is created, it has to be approved and it has to be assigned a budget, so that it can initiate a new negotiation. It is necessary to invoke the ApproveParty tool, in order to allow the party to pass from PENDING state (assigned at creation time) to APPROVED state, and to define the initial budget for the negotiation.
This is an essential part of the process to complete the party registration into the system.
Parameters
- -b arg: Initial balance assigned to the party.
- -cl arg: Credit Limit available to the party.
- -p arg: Product ID in the database, assigned at time of its creation.
Return Value
- template list: The list of template in SLA@SOI syntax.
Request example
./ApproveParty.sh -b 10 -cl 5000 -p 465
This will change the state of party with ID=465 from PENDING to APPROVED state, and will assign the initial budget and balance.
Response example
AddUnitResource
Description
The AddUnitResource tool allow to add a resource type to be negotiated. You can specify a name, a description, the type and the measurable unit of that resource. This term could be subsequently expressed as a guarantee inside an SLA template.
Parameters
- -d arg : Unit Resource Description
- -i arg : Unit Resource InstanceId
- -n arg : Unit Resource Name (mandatory)
- -r arg : OVF Resource Reservation [yes or no] (default=no)
- -t arg : Unit Resource Type (mandatory)
- -u arg : Unit Resource Unit
Return Value
null
Request example
Response example
AddFixedFee
Description
The AddFixedFee tool allow to create a new price offer of type fixed. You can specify the period of validity of the offer, the billing period, the timing range of validity of the price and, of course, the price value.
Parameters
- -c arg : Fixed Fee Currency [ EUR (default) ]
- -d arg Fixed Fee Datatype [ vm (default), integer, MHz, MB ]
- -f arg Fixed Fee Validity From (mandatory) [dd/mm/yyy]
- -p arg Fixed Fee Period (mandatory) [one_time_charge, per_hour, per_day, etc...]
- -q arg Fixed Fee Quantity [ 1 (default) ]
- -t arg Fixed Fee Type (mandatory) [one_time_charge, per_hour, per_day, etc...]
- -u arg Fixed Fee Validity Until (mandatory) [dd/mm/yyy]
- -v arg Fixed Fee Value (mandatory)
Return Value
null
Request example
Response example
AddVariableFee
Description
The AddVariableFee tool allow to create a new price offer of type variable. The variable fee is a pricing type which is subject of particular conditions. There are resources, in fact, whose price change based on certain conditions. The price of the network resource it's an example. There are different ranges (the conditions) for which the price may change. It requires the same parameters of the AddFixedFee tool, but in addition it specifiy the condition for which the price apply.
Parameters
-c <arg> Variable Fee Currency [ EUR (default) ]
-cond <arg> Variable Fee Condition (mandatory)
-condd <arg> Variable Fee Condition Datatype (mandatory)
-condv <arg> Variable Fee Condition Value (mandatory) ]
-d <arg> Variable Fee Datatype (mandatory)
-f <arg> Variable Fee Validity From (mandatory) [dd/mm/yyy]
-p <arg> Variable Fee Period (mandatory)
-q <arg> Variable Fee Quantity (mandatory)
-t <arg> Variable Fee Type (mandatory)
-u <arg> Variable Fee Validity Until (mandatory) [dd/mm/yyy]
-v <arg> Variable Fee Value (mandatory)
Return Value
null
Request example
Response example
AddCompoundFee
Description
Using the AddCompoundFee program the provider can create a complex price offer, composed by different fixed and variable fees.
Parameters
-c <arg> Compound Fee Currency [ EUR (default) ]
-f <arg> Compound Fee Validity From (mandatory) [dd/mm/yyy]
-ff <arg> Fixed Fees Ids [id1,id2,...]
-p <arg> Compound Fee Period (mandatory)
-u <arg> Compound Fee Validity Until (mandatory) [dd/mm/yyy]
-vf <arg> Variable Fees Ids [id1,id2,...]
Return Value
null
Request example
Response example
AddGuarantee
Description
The Provider uses the AddGuarantee program to create guarantee to specify terms about QoS and QoP that will be applied to the resources.
Parameters
- -a arg : Guarantee AgreementTerm
- -d arg : Guarantee Description (mandatory)
- -n arg : Guarantee Name (mandatory)
- -op arg: Guarantee Operator
- -p arg : Guarantee Percentage Price Variation (mandatory) [ (0:1] ]
- -s arg : Guarantee slaTemplateId
- -t arg : Guarantee Type (mandatory) [location, reserve, co_location_rack, etc.]
- -v arg : Guarantee Value
- -vt arg: Guarantee ValueType
Return Value
null
Request example
Response example
AssociatePrice
Description
The AssociatePrice tool allow to associate a price with a priced item (e.g. Unit Resource).
Parameters
- -p arg : Price Id (mandatory)
- -pi arg : Priced Item Id (mandatory)
Return Value
null
Request example
Response example
AssociateGuarantee
Description
The AssociateGuarantee tool allow to associate a guarantee to a priced item (e.g. Unit Resource).
Parameters
- -g arg : guarantee Id (mandatory)
- -p arg : Priced Item Id (mandatory)
Return Value
null
Request example
Response example
Delete*Resource*
Description
The Delete*Resource* tool allow to delete a resource from database given the id of that resource (e.g. Unit Resource).
Parameters
- -id arg : Id of the resource to delete(mandatory)
Return Value
null