Jump to: navigation, search

Difference between revisions of "PCI configration Database and API"

(Created page with " ===API for whitelist=== not only the whitelist, the alias API also meaningful for administrator's pespective. the horizon could utilized the alias db to find what kind of de...")
 
(API for whitelist)
Line 10: Line 10:
 
2)  after next use the config, change take effect.  
 
2)  after next use the config, change take effect.  
  
====DB for pci configration====
+
===DB for pci configration===
 
   talbe: pci_config{
 
   talbe: pci_config{
 
                 id  
 
                 id  
Line 30: Line 30:
 
         update the one object one time, ie, the white list on host "A":  pci_config_update(context, 'whitelist', "A", {"vendor_id":"v1", "proudect_id":"p1", "address":"a1"  }):
 
         update the one object one time, ie, the white list on host "A":  pci_config_update(context, 'whitelist', "A", {"vendor_id":"v1", "proudect_id":"p1", "address":"a1"  }):
  
====PCI releated Objects====
+
===PCI releated Objects===
 
   Objects: white list/ alias/ group keys(on demand grop)
 
   Objects: white list/ alias/ group keys(on demand grop)
 
   objects property:  sets of k,v
 
   objects property:  sets of k,v
 
      
 
      
====API interface====
+
===API interface===
 
     config-object-name:  whitelist/alias/group
 
     config-object-name:  whitelist/alias/group
  

Revision as of 02:21, 4 December 2013

API for whitelist

not only the whitelist, the alias API also meaningful for administrator's pespective. the horizon could utilized the alias db to find what kind of device is avaliable to the tenants.

white list/ alias/ group on demand is all some kind of (k, v) pairs, PCI API can exploit this to achive high flexibility.

here is the very draft idea about API.

1) if database is not NULL ,configration is ommit and given warning. 2) after next use the config, change take effect.

DB for pci configration

  talbe: pci_config{
               id 
               compute_node_id 
               object : whitelist/alias/group on demand
               key 
               value
               value_type:  string, RE, list  # for further enhancement 
           }

alias and on-demand group key is global.

DB API:

   pci_config_get(context, obj_name):
   pci_config_get_by_node(context, obj_name, node_id):
   pci_config_update(context, obj_name, node_id, vlaues):
       update the one object one time, ie, the white list on host "A":  pci_config_update(context, 'whitelist', "A", {"vendor_id":"v1", "proudect_id":"p1", "address":"a1"  }):

PCI releated Objects

  Objects: white list/ alias/ group keys(on demand grop)
  objects property:  sets of k,v
   

API interface

   config-object-name:  whitelist/alias/group
   GET/v2/​{tenant_id}​/os-pci-config
    show the pci configraion objects name.
    {"pci_config": ['alias', 'whitelist', 'group']}
   GET/v2/​{tenant_id}​/os-pci-config/{config-object-name}
   show the pci configraion object's detail
    i.e {config-object-name} is pci_alias:
     {"pci_alias": [{'product_id':'8086', 'group':'nic-g1', 'compute-node-id':""}]}

   GET/v2/​{tenant_id}​/os-pci-config/{config-object-name}/{compute-node-id'}
   show the pci configraion object's detail
    i.e {config-object-name} is pci_whitelist:
     {"pci_whitelist": {'product_id':'8086', 'group':'nic-g1', 'compute-node-id':"3"}}


   PUT/v2/​{tenant_id}​/os-pci-config/{config-object-name}/{compute-node-id}
   ie.   i.e {config-object-name} is pci_whitelist:
    {"pci_whitelist": {'product_id':'8086', 'address':'a1' , 'group':'nic-g1'}}
   PUT/v2/​{tenant_id}​/os-pci-config/{config-object-name}/
   change a global configration. 
   
   DELETE/v2/​{tenant_id}​/os-pci-config/{config-object-name}/{compute_node_id}
   DELETE/v2/​{tenant_id}​/os-pci-config/{config-object-name}/
  UPDATE//v2/​{tenant_id}​/os-pci-config/{config-object-name}/
  UPDATE//v2/​{tenant_id}​/os-pci-config/{config-object-name}/{compute_node_id}
   make config 'config-object-name' take effect.