11 #ifndef GI_EPR_L2EP_HPP 12 #define GI_EPR_L2EP_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" 28 #include "modelgbp/epr/L3Net.hpp" 34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 81;
49 return getObjectInstance().isSet(2654212ul, opflex::modb::PropertyInfo::STRING);
59 return getObjectInstance().getString(2654212ul);
68 const std::string&
getContext(
const std::string& defaultValue)
70 return getContext().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(2654212ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(2654212ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
105 return getObjectInstance().isSet(2654211ul, opflex::modb::PropertyInfo::STRING);
115 return getObjectInstance().getString(2654211ul);
124 const std::string&
getGroup(
const std::string& defaultValue)
126 return getGroup().get_value_or(defaultValue);
139 getTLMutator().modify(getClassId(), getURI())->setString(2654211ul, newValue);
151 getTLMutator().modify(getClassId(), getURI())->unset(2654211ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
161 return getObjectInstance().isSet(2654213ul, opflex::modb::PropertyInfo::STRING);
171 return getObjectInstance().getString(2654213ul);
195 getTLMutator().modify(getClassId(), getURI())->setString(2654213ul, newValue);
207 getTLMutator().modify(getClassId(), getURI())->unset(2654213ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
217 return getObjectInstance().isSet(2654210ul, opflex::modb::PropertyInfo::MAC);
224 boost::optional<const opflex::modb::MAC&>
getMac()
227 return getObjectInstance().getMAC(2654210ul);
236 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
238 return getMac().get_value_or(defaultValue);
251 getTLMutator().modify(getClassId(), getURI())->setMAC(2654210ul, newValue);
263 getTLMutator().modify(getClassId(), getURI())->unset(2654210ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
273 return getObjectInstance().isSet(2654209ul, opflex::modb::PropertyInfo::STRING);
283 return getObjectInstance().getString(2654209ul);
292 const std::string&
getUuid(
const std::string& defaultValue)
294 return getUuid().get_value_or(defaultValue);
307 getTLMutator().modify(getClassId(), getURI())->setString(2654209ul, newValue);
319 getTLMutator().modify(getClassId(), getURI())->unset(2654209ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
329 return getObjectInstance().isSet(2654214ul, opflex::modb::PropertyInfo::STRING);
339 return getObjectInstance().getString(2654214ul);
348 const std::string&
getVmName(
const std::string& defaultValue)
350 return getVmName().get_value_or(defaultValue);
363 getTLMutator().modify(getClassId(), getURI())->setString(2654214ul, newValue);
375 getTLMutator().modify(getClassId(), getURI())->unset(2654214ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
390 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
391 opflex::ofcore::OFFramework& framework,
392 const opflex::modb::URI& uri)
394 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Ep>(framework,
CLASS_ID, uri);
408 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
409 const opflex::modb::URI& uri)
411 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
432 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
433 opflex::ofcore::OFFramework& framework,
434 const std::string& eprL2EpContext,
435 const opflex::modb::MAC& eprL2EpMac)
437 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
457 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
458 const std::string& eprL2EpContext,
459 const opflex::modb::MAC& eprL2EpMac)
461 return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac);
476 const std::string& gbpeAttestationName)
494 const std::string& gbpeAttestationName)
496 boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
497 CLASS_ID, getURI(), 2150137892ul, 36,
498 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
500 result->setName(gbpeAttestationName);
520 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
521 getFramework(),
CLASS_ID, getURI(), 2150137892ul, 36, out);
536 const std::string& spanLocalEpFromEpRTgtSource)
554 const std::string& spanLocalEpFromEpRTgtSource)
556 boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
557 CLASS_ID, getURI(), 2150137910ul, 54,
558 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
560 result->setSource(spanLocalEpFromEpRTgtSource);
580 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
581 getFramework(),
CLASS_ID, getURI(), 2150137910ul, 54, out);
596 const std::string& eprL3NetIp)
598 return modelgbp::epr::L3Net::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"EprL3Net").addElement(eprL3NetIp).build());
614 const std::string& eprL3NetIp)
616 boost::shared_ptr<modelgbp::epr::L3Net> result = addChild<modelgbp::epr::L3Net>(
617 CLASS_ID, getURI(), 2150137938ul, 82,
618 opflex::modb::URIBuilder(getURI()).addElement(
"EprL3Net").addElement(eprL3NetIp).build()
620 result->setIp(eprL3NetIp);
640 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::L3Net>(
641 getFramework(),
CLASS_ID, getURI(), 2150137938ul, 82, out);
654 getTLMutator().remove(CLASS_ID, getURI());
667 static void remove(opflex::ofcore::OFFramework& framework,
668 const opflex::modb::URI& uri)
670 MO::remove(framework, CLASS_ID, uri);
683 static void remove(
const opflex::modb::URI& uri)
685 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
705 opflex::ofcore::OFFramework& framework,
706 const std::string& eprL2EpContext,
707 const opflex::modb::MAC& eprL2EpMac)
709 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
729 const std::string& eprL2EpContext,
730 const opflex::modb::MAC& eprL2EpMac)
732 remove(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac);
747 opflex::ofcore::OFFramework& framework,
748 opflex::modb::ObjectListener* listener)
750 opflex::modb::mointernal
751 ::MO::registerListener(framework, listener, CLASS_ID);
766 opflex::modb::ObjectListener* listener)
778 opflex::ofcore::OFFramework& framework,
779 opflex::modb::ObjectListener* listener)
781 opflex::modb::mointernal
782 ::MO::unregisterListener(framework, listener, CLASS_ID);
792 opflex::modb::ObjectListener* listener)
802 opflex::ofcore::OFFramework& framework,
803 const opflex::modb::URI& uri,
804 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
805 : MO(framework, CLASS_ID, uri, oi) { }
810 #endif // GI_EPR_L2EP_HPP bool isVmNameSet()
Check whether vmName has been set.
Definition: L2Ep.hpp:327
static boost::optional< boost::shared_ptr< modelgbp::epr::L2Ep > > resolve(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Retrieve an instance of L2Ep from the default managed object store by constructing its URI from the p...
Definition: L2Ep.hpp:457
modelgbp::epr::L2Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:305
modelgbp::epr::L2Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L2Ep.hpp:317
boost::shared_ptr< modelgbp::epr::L3Net > addEprL3Net(const std::string &eprL3NetIp)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L2Ep.hpp:613
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: L2Ep.hpp:765
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L2Ep.hpp:56
modelgbp::epr::L2Ep & setVmName(const std::string &newValue)
Set vmName to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:361
modelgbp::epr::L2Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L2Ep.hpp:149
static boost::optional< boost::shared_ptr< modelgbp::epr::L2Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Retrieve an instance of L2Ep from the managed object store by constructing its URI from the path elem...
Definition: L2Ep.hpp:432
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L2Ep.hpp:112
modelgbp::epr::L2Ep & unsetInterfaceName()
Unset interfaceName in the currently-active mutator.
Definition: L2Ep.hpp:205
modelgbp::epr::L2Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:81
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: L2Ep.hpp:493
const std::string & getInterfaceName(const std::string &defaultValue)
Get the value of interfaceName if set, otherwise the value of default passed in.
Definition: L2Ep.hpp:180
const std::string & getVmName(const std::string &defaultValue)
Get the value of vmName if set, otherwise the value of default passed in.
Definition: L2Ep.hpp:348
static boost::optional< boost::shared_ptr< modelgbp::epr::L2Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L2Ep from the managed object store.
Definition: L2Ep.hpp:390
modelgbp::epr::L2Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:249
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L2Ep.hpp:280
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: L2Ep.hpp:518
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: L2Ep.hpp:553
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Net > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L3Net from the managed object store.
Definition: L3Net.hpp:102
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L2Ep.hpp:777
modelgbp::epr::L2Ep & unsetVmName()
Unset vmName in the currently-active mutator.
Definition: L2Ep.hpp:373
modelgbp::epr::L2Ep & setInterfaceName(const std::string &newValue)
Set interfaceName to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:193
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: L2Ep.hpp:224
bool isMacSet()
Check whether mac has been set.
Definition: L2Ep.hpp:215
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< boost::shared_ptr< modelgbp::epr::L3Net > > resolveEprL3Net(const std::string &eprL3NetIp)
Retrieve the child object with the specified naming properties.
Definition: L2Ep.hpp:595
modelgbp::epr::L2Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L2Ep.hpp:261
bool isContextSet()
Check whether context has been set.
Definition: L2Ep.hpp:47
boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolveSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: L2Ep.hpp:535
const std::string & getContext(const std::string &defaultValue)
Get the value of context if set, otherwise the value of default passed in.
Definition: L2Ep.hpp:68
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L2Ep.hpp:791
modelgbp::epr::L2Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:137
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: L2Ep.hpp:292
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: L2Ep.hpp:236
L2Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L2Ep.
Definition: L2Ep.hpp:801
boost::optional< const std::string & > getVmName()
Get the value of vmName if it has been set.
Definition: L2Ep.hpp:336
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: L2Ep.hpp:578
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
bool isGroupSet()
Check whether group has been set.
Definition: L2Ep.hpp:103
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: L2Ep.hpp:746
void resolveEprL3Net(std::vector< boost::shared_ptr< modelgbp::epr::L3Net > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epr::L3Net.
Definition: L2Ep.hpp:638
boost::optional< boost::shared_ptr< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition: L2Ep.hpp:475
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L2Ep.
Definition: L2Ep.hpp:41
modelgbp::epr::L2Ep & unsetContext()
Unset context in the currently-active mutator.
Definition: L2Ep.hpp:93
bool isUuidSet()
Check whether uuid has been set.
Definition: L2Ep.hpp:271
const std::string & getGroup(const std::string &defaultValue)
Get the value of group if set, otherwise the value of default passed in.
Definition: L2Ep.hpp:124
bool isInterfaceNameSet()
Check whether interfaceName has been set.
Definition: L2Ep.hpp:159
boost::optional< const std::string & > getInterfaceName()
Get the value of interfaceName if it has been set.
Definition: L2Ep.hpp:168
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
static boost::optional< boost::shared_ptr< modelgbp::epr::L2Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L2Ep from the managed object store using the default framework instance...
Definition: L2Ep.hpp:408