7 #include <vnc_cfg_types.h>
8 #include <agent_types.h>
30 std::ostringstream buffer;
32 buffer <<
"id : " <<
id_;
37 ForwardingClassSandeshResp *resp =
static_cast<ForwardingClassSandeshResp *
>(sresp);
38 ForwardingClassSandeshData data;
49 std::vector<ForwardingClassSandeshData> &list =
50 const_cast<std::vector<ForwardingClassSandeshData>&
>(resp->get_fc_list());
118 DB *db,
const std::string &name):
129 (
static_cast<DBTable *
>(fc_table))->Init();
133 std::unique_ptr<DBEntry>
138 return std::unique_ptr<DBEntry>(
static_cast<DBEntry *
>(fc));
146 return static_cast<DBEntry *
>(fc);
177 autogen::ForwardingClass *cfg =
178 static_cast <autogen::ForwardingClass *> (node->
GetObject());
180 autogen::IdPermsType id_perms = cfg->id_perms();
181 CfgUuidSet(id_perms.uuid.uuid_mslong, id_perms.uuid.uuid_lslong, u);
200 autogen::ForwardingClass *data =
201 static_cast<autogen::ForwardingClass *
>(node->
GetObject());
214 autogen::QosQueue *qos_queue =
215 static_cast<autogen::QosQueue *
>(adj_node->
GetObject());
216 autogen::IdPermsType id_perms = qos_queue->id_perms();
218 id_perms.uuid.uuid_lslong, qos_queue_uuid);
224 data->mpls_exp(), data->id(), qos_queue_uuid,
231 const std::string &context) {
237 void ForwardingClassSandeshReq::HandleRequest()
const {
239 get_name(), get_id()));
240 sand->DoSandesh(sand);
243 void AddForwardingClass::HandleRequest()
const {
244 QosResponse *resp =
new QosResponse();
245 resp->set_context(context());
247 if (get_id() > 255 || get_dscp_value() > 63 || get_mpls_exp() > 7 ||
248 get_vlan_priority() > 7) {
249 resp->set_resp(
"Error");
255 sprintf(str,
"00000000-0000-0000-0000-00%010x", get_uuid());
259 sprintf(str1,
"00000000-0000-0000-0000-00%010x", get_qos_queue_uuid());
267 get_dscp_value(), get_vlan_priority(),
268 get_mpls_exp(), get_id(),
271 resp->set_resp(
"Success");
275 void DeleteForwardingClass::HandleRequest()
const {
276 QosResponse *resp =
new QosResponse();
277 resp->set_context(context());
280 sprintf(str,
"00000000-0000-0000-0000-00%010x", get_uuid());
287 req.
data.reset(NULL);
289 resp->set_resp(
"Success");
virtual DBEntry * OperDBAdd(const DBRequest *req)
virtual ~ForwardingClassTable()
virtual bool IsLess(const DBEntry &rhs) const
virtual bool OperDBOnChange(DBEntry *entry, const DBRequest *req)
static Agent * GetInstance()
static boost::uuids::uuid StringToUuid(const std::string &str)
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
std::string GetString(const std::string &key) const
std::string ToString() const
virtual bool ProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual bool OperDBResync(DBEntry *entry, const DBRequest *req)
ConfigManager * config_manager() const
virtual bool OperDBDelete(DBEntry *entry, const DBRequest *req)
std::unique_ptr< DBRequestData > data
AgentDBEntry * FindActiveEntry(const DBEntry *key)
bool Enqueue(DBRequest *req)
adjacency_iterator end(DBGraph *graph)
static std::string UuidToString(const boost::uuids::uuid &id)
virtual bool Change(const DBRequest *req)
std::unique_ptr< DBRequestKey > KeyPtr
KeyPtr GetDBRequestKey() const
QosQueueTable * qos_queue_table() const
static DBTableBase * CreateTable(Agent *agent, DB *db, const std::string &name)
const DBGraph * GetGraph() const
void AddForwardingClassNode(IFMapNode *node)
virtual std::unique_ptr< DBEntry > AllocEntry(const DBRequestKey *k) const
ForwardingClass(const boost::uuids::uuid &uuid)
std::unique_ptr< DBRequestKey > key
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
const std::string & name() const
IFMapAgentTable * cfg_qos_queue_table() const
IFMapObject * GetObject()
ForwardingClassTable(Agent *agent, DB *db, const std::string &name)
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
QosQueueConstRef qos_queue_ref_
const Agent * agent() const
ForwardingClassData * BuildData(IFMapNode *node)
virtual bool IFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
virtual bool IFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual ~ForwardingClass()
ForwardingClassTable * forwarding_class_table() const
AgentConfig * cfg() const
bool SkipNode(IFMapNode *node)
virtual void SetKey(const DBRequestKey *key)
adjacency_iterator begin(DBGraph *graph)
virtual bool DBEntrySandesh(Sandesh *resp, std::string &name) const
boost::uuids::uuid qos_queue_uuid_
void set_agent(Agent *agent)