11 #ifndef GI_EPDR_LOCALL3EP_HPP 12 #define GI_EPDR_LOCALL3EP_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbpe/EpgMappingCtx.hpp" 24 #include "modelgbp/epdr/EndPointToGroupRSrc.hpp" 30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 89;
45 return getObjectInstance().isSet(2916355ul, opflex::modb::PropertyInfo::STRING);
52 boost::optional<const std::string&>
getIp()
55 return getObjectInstance().getString(2916355ul);
64 const std::string&
getIp(
const std::string& defaultValue)
66 return getIp().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setString(2916355ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(2916355ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(2916354ul, opflex::modb::PropertyInfo::MAC);
108 boost::optional<const opflex::modb::MAC&>
getMac()
111 return getObjectInstance().getMAC(2916354ul);
120 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
122 return getMac().get_value_or(defaultValue);
135 getTLMutator().modify(getClassId(), getURI())->setMAC(2916354ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(2916354ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
157 return getObjectInstance().isSet(2916353ul, opflex::modb::PropertyInfo::STRING);
167 return getObjectInstance().getString(2916353ul);
176 const std::string&
getUuid(
const std::string& defaultValue)
178 return getUuid().get_value_or(defaultValue);
191 getTLMutator().modify(getClassId(), getURI())->setString(2916353ul, newValue);
203 getTLMutator().modify(getClassId(), getURI())->unset(2916353ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
218 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> >
resolve(
219 opflex::ofcore::OFFramework& framework,
220 const opflex::modb::URI& uri)
222 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(framework,
CLASS_ID, uri);
236 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> >
resolve(
237 const opflex::modb::URI& uri)
239 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
258 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> >
resolve(
259 opflex::ofcore::OFFramework& framework,
260 const std::string& epdrLocalL3EpUuid)
262 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EpdrL3Discovered").addElement(
"EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
280 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> >
resolve(
281 const std::string& epdrLocalL3EpUuid)
283 return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
314 boost::shared_ptr<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
315 CLASS_ID, getURI(), 2150400013ul, 13,
316 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeEpgMappingCtx").build()
349 boost::shared_ptr<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
350 CLASS_ID, getURI(), 2150400085ul, 85,
351 opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointToGroupRSrc").build()
366 getTLMutator().remove(CLASS_ID, getURI());
379 static void remove(opflex::ofcore::OFFramework& framework,
380 const opflex::modb::URI& uri)
382 MO::remove(framework, CLASS_ID, uri);
395 static void remove(
const opflex::modb::URI& uri)
397 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
415 opflex::ofcore::OFFramework& framework,
416 const std::string& epdrLocalL3EpUuid)
418 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"EpdrL3Discovered").addElement(
"EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
436 const std::string& epdrLocalL3EpUuid)
438 remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
453 opflex::ofcore::OFFramework& framework,
454 opflex::modb::ObjectListener* listener)
456 opflex::modb::mointernal
457 ::MO::registerListener(framework, listener, CLASS_ID);
472 opflex::modb::ObjectListener* listener)
484 opflex::ofcore::OFFramework& framework,
485 opflex::modb::ObjectListener* listener)
487 opflex::modb::mointernal
488 ::MO::unregisterListener(framework, listener, CLASS_ID);
498 opflex::modb::ObjectListener* listener)
508 opflex::ofcore::OFFramework& framework,
509 const opflex::modb::URI& uri,
510 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
511 : MO(framework, CLASS_ID, uri, oi) { }
516 #endif // GI_EPDR_LOCALL3EP_HPP modelgbp::epdr::LocalL3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:77
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL3Ep.
Definition: LocalL3Ep.hpp:37
boost::optional< boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:330
LocalL3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL3Ep.
Definition: LocalL3Ep.hpp:507
boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > addGbpeEpgMappingCtx()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalL3Ep.hpp:311
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: LocalL3Ep.hpp:108
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL3Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalL3Ep from the managed object store using the default framework instance...
Definition: LocalL3Ep.hpp:236
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: LocalL3Ep.hpp:176
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalL3Ep.hpp:483
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalL3Ep.hpp:497
bool isIpSet()
Check whether ip has been set.
Definition: LocalL3Ep.hpp:43
bool isMacSet()
Check whether mac has been set.
Definition: LocalL3Ep.hpp:99
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL3Ep > > resolve(const std::string &epdrLocalL3EpUuid)
Retrieve an instance of LocalL3Ep from the default managed object store by constructing its URI from ...
Definition: LocalL3Ep.hpp:280
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition: LocalL3Ep.hpp:64
modelgbp::epdr::LocalL3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: LocalL3Ep.hpp:145
modelgbp::epdr::LocalL3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: LocalL3Ep.hpp:89
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition: LocalL3Ep.hpp:471
const opflex::modb::MAC & getMac(const opflex::modb::MAC &defaultValue)
Get the value of mac if set, otherwise the value of default passed in.
Definition: LocalL3Ep.hpp:120
bool isUuidSet()
Check whether uuid has been set.
Definition: LocalL3Ep.hpp:155
modelgbp::epdr::LocalL3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: LocalL3Ep.hpp:201
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: LocalL3Ep.hpp:52
boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:295
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition: LocalL3Ep.hpp:452
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: LocalL3Ep.hpp:164
boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > addEpdrEndPointToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalL3Ep.hpp:346
static boost::optional< boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointToGroupRSrc from the managed object store.
Definition: EndPointToGroupRSrc.hpp:257
Definition: LocalL3Ep.hpp:29
modelgbp::epdr::LocalL3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:133
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL3Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL3EpUuid)
Retrieve an instance of LocalL3Ep from the managed object store by constructing its URI from the path...
Definition: LocalL3Ep.hpp:258
static boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtx from the managed object store.
Definition: EpgMappingCtx.hpp:50
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL3Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalL3Ep from the managed object store.
Definition: LocalL3Ep.hpp:218
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
modelgbp::epdr::LocalL3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:189