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" 28 #include "modelgbp/epdr/EndPointToSecGroupRSrc.hpp" 34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 110;
49 return getObjectInstance().isSet(3604483ul, opflex::modb::PropertyInfo::STRING);
56 boost::optional<const std::string&>
getIp()
59 return getObjectInstance().getString(3604483ul);
68 const std::string&
getIp(
const std::string& defaultValue)
70 return getIp().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(3604483ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(3604483ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
105 return getObjectInstance().isSet(3604482ul, opflex::modb::PropertyInfo::MAC);
112 boost::optional<const opflex::modb::MAC&>
getMac()
115 return getObjectInstance().getMAC(3604482ul);
124 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
126 return getMac().get_value_or(defaultValue);
139 getTLMutator().modify(getClassId(), getURI())->setMAC(3604482ul, newValue);
151 getTLMutator().modify(getClassId(), getURI())->unset(3604482ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
161 return getObjectInstance().isSet(3604481ul, opflex::modb::PropertyInfo::STRING);
171 return getObjectInstance().getString(3604481ul);
180 const std::string&
getUuid(
const std::string& defaultValue)
182 return getUuid().get_value_or(defaultValue);
195 getTLMutator().modify(getClassId(), getURI())->setString(3604481ul, newValue);
207 getTLMutator().modify(getClassId(), getURI())->unset(3604481ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
222 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> >
resolve(
223 opflex::ofcore::OFFramework& framework,
224 const opflex::modb::URI& uri)
226 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(framework,
CLASS_ID, uri);
240 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> >
resolve(
241 const opflex::modb::URI& uri)
243 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
262 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> >
resolve(
263 opflex::ofcore::OFFramework& framework,
264 const std::string& epdrLocalL3EpUuid)
266 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EpdrL3Discovered").addElement(
"EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
284 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> >
resolve(
285 const std::string& epdrLocalL3EpUuid)
287 return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
318 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
319 CLASS_ID, getURI(), 2151088149ul, 21,
320 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeEpgMappingCtx").build()
353 OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
354 CLASS_ID, getURI(), 2151088231ul, 103,
355 opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointToGroupRSrc").build()
374 const std::string& epdrEndPointToSecGroupRSrcTargetName)
376 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
377 return modelgbp::epdr::EndPointToSecGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build());
395 const std::string& epdrEndPointToSecGroupRSrcTargetName)
397 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
398 OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> result = addChild<modelgbp::epdr::EndPointToSecGroupRSrc>(
399 CLASS_ID, getURI(), 2151088234ul, 106,
400 opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build()
402 result->setTargetSecGroup(opflex::modb::URI(epdrEndPointToSecGroupRSrcTargetName));
422 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epdr::EndPointToSecGroupRSrc>(
423 getFramework(),
CLASS_ID, getURI(), 2151088234ul, 106, out);
436 getTLMutator().remove(
CLASS_ID, getURI());
449 static void remove(opflex::ofcore::OFFramework& framework,
450 const opflex::modb::URI& uri)
452 MO::remove(framework,
CLASS_ID, uri);
465 static void remove(
const opflex::modb::URI& uri)
467 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
485 opflex::ofcore::OFFramework& framework,
486 const std::string& epdrLocalL3EpUuid)
488 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"EpdrL3Discovered").addElement(
"EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
506 const std::string& epdrLocalL3EpUuid)
508 remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
523 opflex::ofcore::OFFramework& framework,
524 opflex::modb::ObjectListener* listener)
526 opflex::modb::mointernal
527 ::MO::registerListener(framework, listener,
CLASS_ID);
542 opflex::modb::ObjectListener* listener)
554 opflex::ofcore::OFFramework& framework,
555 opflex::modb::ObjectListener* listener)
557 opflex::modb::mointernal
558 ::MO::unregisterListener(framework, listener,
CLASS_ID);
568 opflex::modb::ObjectListener* listener)
578 opflex::ofcore::OFFramework& framework,
579 const opflex::modb::URI& uri,
580 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
581 : MO(framework,
CLASS_ID, uri, oi) { }
586 #endif // GI_EPDR_LOCALL3EP_HPP OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > addEpdrEndPointToSecGroupRSrc(const std::string &epdrEndPointToSecGroupRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalL3Ep.hpp:394
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:334
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:299
modelgbp::epdr::LocalL3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:81
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL3Ep.
Definition: LocalL3Ep.hpp:41
static boost::optional< OF_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:262
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: LocalL3Ep.hpp:112
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:180
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalL3Ep.hpp:553
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalL3Ep.hpp:567
bool isIpSet()
Check whether ip has been set.
Definition: LocalL3Ep.hpp:47
bool isMacSet()
Check whether mac has been set.
Definition: LocalL3Ep.hpp:103
static boost::optional< OF_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:222
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:68
modelgbp::epdr::LocalL3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: LocalL3Ep.hpp:149
static boost::optional< OF_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
static boost::optional< OF_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:284
modelgbp::epdr::LocalL3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: LocalL3Ep.hpp:93
OF_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:350
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:541
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:124
void resolveEpdrEndPointToSecGroupRSrc(std::vector< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epdr::EndPointToSecGroupRSrc.
Definition: LocalL3Ep.hpp:420
static boost::optional< OF_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:240
static boost::optional< OF_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
bool isUuidSet()
Check whether uuid has been set.
Definition: LocalL3Ep.hpp:159
modelgbp::epdr::LocalL3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: LocalL3Ep.hpp:205
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: LocalL3Ep.hpp:56
OF_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:315
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:522
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > resolveEpdrEndPointToSecGroupRSrc(const std::string &epdrEndPointToSecGroupRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:373
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: LocalL3Ep.hpp:168
Definition: LocalL3Ep.hpp:33
modelgbp::epdr::LocalL3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:137
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointToSecGroupRSrc from the managed object store.
Definition: EndPointToSecGroupRSrc.hpp:257
LocalL3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL3Ep.
Definition: LocalL3Ep.hpp:577
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:193