コード例 #1
0
 def create_portprofile(self, tenant_id, profile_name, qos):
     """Create port profile"""
     LOG.debug("create_portprofile() called\n")
     portprofile = cdb.add_portprofile(tenant_id, profile_name, const.NO_VLAN_ID, qos)
     new_pp = cutil.make_portprofile_dict(
         tenant_id, portprofile[const.UUID], portprofile[const.PPNAME], portprofile[const.PPQOS]
     )
     return new_pp
コード例 #2
0
 def create_portprofile(self, tenant_id, profile_name, qos):
     """Create port profile"""
     LOG.debug("create_portprofile() called\n")
     portprofile = cdb.add_portprofile(tenant_id, profile_name,
                              const.NO_VLAN_ID, qos)
     new_pp = cutil.make_portprofile_dict(tenant_id,
                                          portprofile[const.UUID],
                                          portprofile[const.PPNAME],
                                          portprofile[const.PPQOS])
     return new_pp
コード例 #3
0
ファイル: test_database.py プロジェクト: BillTheBest/quantum
 def create_portprofile(self, tenant_id, name, vlan_id, qos):
     """Create a portprofile"""
     pp_dict = {}
     try:
         res = l2network_db.add_portprofile(tenant_id, name, vlan_id, qos)
         LOG.debug("Created port profile: %s" % res.uuid)
         pp_dict["portprofile-id"] = str(res.uuid)
         pp_dict["portprofile-name"] = res.name
         pp_dict["vlan-id"] = str(res.vlan_id)
         pp_dict["qos"] = res.qos
         return pp_dict
     except Exception, exc:
         LOG.error("Failed to create port profile: %s" % str(exc))