11 #ifndef GI_EPR_L3EP_HPP 12 #define GI_EPR_L3EP_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbpe/Attestation.hpp" 24 #include "modelgbp/span/LocalEpFromEpRTgt.hpp" 30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 83;
45 return getObjectInstance().isSet(2719749ul, opflex::modb::PropertyInfo::STRING);
55 return getObjectInstance().getString(2719749ul);
64 const std::string&
getContext(
const std::string& defaultValue)
66 return getContext().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setString(2719749ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(2719749ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(2719747ul, opflex::modb::PropertyInfo::STRING);
111 return getObjectInstance().getString(2719747ul);
120 const std::string&
getGroup(
const std::string& defaultValue)
122 return getGroup().get_value_or(defaultValue);
135 getTLMutator().modify(getClassId(), getURI())->setString(2719747ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(2719747ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
157 return getObjectInstance().isSet(2719748ul, opflex::modb::PropertyInfo::STRING);
164 boost::optional<const std::string&>
getIp()
167 return getObjectInstance().getString(2719748ul);
176 const std::string&
getIp(
const std::string& defaultValue)
178 return getIp().get_value_or(defaultValue);
191 getTLMutator().modify(getClassId(), getURI())->setString(2719748ul, newValue);
203 getTLMutator().modify(getClassId(), getURI())->unset(2719748ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
213 return getObjectInstance().isSet(2719746ul, opflex::modb::PropertyInfo::MAC);
220 boost::optional<const opflex::modb::MAC&>
getMac()
223 return getObjectInstance().getMAC(2719746ul);
232 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
234 return getMac().get_value_or(defaultValue);
247 getTLMutator().modify(getClassId(), getURI())->setMAC(2719746ul, newValue);
259 getTLMutator().modify(getClassId(), getURI())->unset(2719746ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
269 return getObjectInstance().isSet(2719745ul, opflex::modb::PropertyInfo::STRING);
279 return getObjectInstance().getString(2719745ul);
288 const std::string&
getUuid(
const std::string& defaultValue)
290 return getUuid().get_value_or(defaultValue);
303 getTLMutator().modify(getClassId(), getURI())->setString(2719745ul, newValue);
315 getTLMutator().modify(getClassId(), getURI())->unset(2719745ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
330 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
331 opflex::ofcore::OFFramework& framework,
332 const opflex::modb::URI& uri)
334 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(framework,
CLASS_ID, uri);
348 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
349 const opflex::modb::URI& uri)
351 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
372 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
373 opflex::ofcore::OFFramework& framework,
374 const std::string& eprL3EpContext,
375 const std::string& eprL3EpIp)
377 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EprL3Universe").addElement(
"EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
397 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
398 const std::string& eprL3EpContext,
399 const std::string& eprL3EpIp)
401 return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
416 const std::string& gbpeAttestationName)
434 const std::string& gbpeAttestationName)
436 boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
437 CLASS_ID, getURI(), 2150203428ul, 36,
438 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
440 result->setName(gbpeAttestationName);
460 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
461 getFramework(),
CLASS_ID, getURI(), 2150203428ul, 36, out);
476 const std::string& spanLocalEpFromEpRTgtSource)
494 const std::string& spanLocalEpFromEpRTgtSource)
496 boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
497 CLASS_ID, getURI(), 2150203446ul, 54,
498 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
500 result->setSource(spanLocalEpFromEpRTgtSource);
520 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
521 getFramework(),
CLASS_ID, getURI(), 2150203446ul, 54, out);
534 getTLMutator().remove(CLASS_ID, getURI());
547 static void remove(opflex::ofcore::OFFramework& framework,
548 const opflex::modb::URI& uri)
550 MO::remove(framework, CLASS_ID, uri);
563 static void remove(
const opflex::modb::URI& uri)
565 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
585 opflex::ofcore::OFFramework& framework,
586 const std::string& eprL3EpContext,
587 const std::string& eprL3EpIp)
589 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"EprL3Universe").addElement(
"EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
609 const std::string& eprL3EpContext,
610 const std::string& eprL3EpIp)
612 remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
627 opflex::ofcore::OFFramework& framework,
628 opflex::modb::ObjectListener* listener)
630 opflex::modb::mointernal
631 ::MO::registerListener(framework, listener, CLASS_ID);
646 opflex::modb::ObjectListener* listener)
658 opflex::ofcore::OFFramework& framework,
659 opflex::modb::ObjectListener* listener)
661 opflex::modb::mointernal
662 ::MO::unregisterListener(framework, listener, CLASS_ID);
672 opflex::modb::ObjectListener* listener)
682 opflex::ofcore::OFFramework& framework,
683 const opflex::modb::URI& uri,
684 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
685 : MO(framework, CLASS_ID, uri, oi) { }
690 #endif // GI_EPR_L3EP_HPP bool isIpSet()
Check whether ip has been set.
Definition: L3Ep.hpp:155
bool isContextSet()
Check whether context has been set.
Definition: L3Ep.hpp:43
modelgbp::epr::L3Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L3Ep.hpp:145
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Retrieve an instance of L3Ep from the managed object store by constructing its URI from the path elem...
Definition: L3Ep.hpp:372
modelgbp::epr::L3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: L3Ep.hpp:201
boost::optional< boost::shared_ptr< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:415
bool isUuidSet()
Check whether uuid has been set.
Definition: L3Ep.hpp:267
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L3Ep from the managed object store using the default framework instance...
Definition: L3Ep.hpp:348
const std::string & getGroup(const std::string &defaultValue)
Get the value of group if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:120
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: L3Ep.hpp:164
const std::string & getContext(const std::string &defaultValue)
Get the value of context if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:64
modelgbp::epr::L3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:189
modelgbp::epr::L3Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:133
modelgbp::epr::L3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:245
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L3Ep.hpp:671
void resolveSpanLocalEpFromEpRTgt(std::vector< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::LocalEpFromEpRTgt.
Definition: L3Ep.hpp:518
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L3Ep.hpp:657
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L3Ep.hpp:52
bool isGroupSet()
Check whether group has been set.
Definition: L3Ep.hpp:99
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:288
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L3Ep.hpp:276
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: L3Ep.hpp:232
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: L3Ep.hpp:645
modelgbp::epr::L3Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:77
static boost::optional< boost::shared_ptr< modelgbp::gbpe::Attestation > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Attestation from the managed object store.
Definition: Attestation.hpp:210
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: L3Ep.hpp:220
modelgbp::epr::L3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L3Ep.hpp:313
boost::shared_ptr< modelgbp::gbpe::Attestation > addGbpeAttestation(const std::string &gbpeAttestationName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L3Ep.hpp:433
boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolveSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:475
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Ep.
Definition: L3Ep.hpp:37
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L3Ep from the managed object store.
Definition: L3Ep.hpp:330
modelgbp::epr::L3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L3Ep.hpp:257
L3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L3Ep.
Definition: L3Ep.hpp:681
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:176
modelgbp::epr::L3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:301
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Retrieve an instance of L3Ep from the default managed object store by constructing its URI from the p...
Definition: L3Ep.hpp:397
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: L3Ep.hpp:626
bool isMacSet()
Check whether mac has been set.
Definition: L3Ep.hpp:211
boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > addSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L3Ep.hpp:493
void resolveGbpeAttestation(std::vector< boost::shared_ptr< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition: L3Ep.hpp:458
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store.
Definition: LocalEpFromEpRTgt.hpp:210
modelgbp::epr::L3Ep & unsetContext()
Unset context in the currently-active mutator.
Definition: L3Ep.hpp:89
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L3Ep.hpp:108
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12