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/SecurityGroupContext.hpp"
32 #include "modelgbp/epr/L3Net.hpp"
38 :
public opflex::modb::mointernal::MO
45 static const opflex::modb::class_id_t
CLASS_ID = 82;
53 return getObjectInstance().isSet(2686980ul, opflex::modb::PropertyInfo::STRING);
63 return getObjectInstance().getString(2686980ul);
72 const std::string&
getContext(
const std::string& defaultValue)
74 return getContext().get_value_or(defaultValue);
87 getTLMutator().modify(getClassId(), getURI())->setString(2686980ul, newValue);
99 getTLMutator().modify(getClassId(), getURI())->unset(2686980ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
109 return getObjectInstance().isSet(2686979ul, opflex::modb::PropertyInfo::STRING);
119 return getObjectInstance().getString(2686979ul);
128 const std::string&
getGroup(
const std::string& defaultValue)
130 return getGroup().get_value_or(defaultValue);
143 getTLMutator().modify(getClassId(), getURI())->setString(2686979ul, newValue);
155 getTLMutator().modify(getClassId(), getURI())->unset(2686979ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
165 return getObjectInstance().isSet(2686981ul, opflex::modb::PropertyInfo::STRING);
175 return getObjectInstance().getString(2686981ul);
199 getTLMutator().modify(getClassId(), getURI())->setString(2686981ul, newValue);
211 getTLMutator().modify(getClassId(), getURI())->unset(2686981ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
221 return getObjectInstance().isSet(2686978ul, opflex::modb::PropertyInfo::MAC);
228 boost::optional<const opflex::modb::MAC&>
getMac()
231 return getObjectInstance().getMAC(2686978ul);
240 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
242 return getMac().get_value_or(defaultValue);
255 getTLMutator().modify(getClassId(), getURI())->setMAC(2686978ul, newValue);
267 getTLMutator().modify(getClassId(), getURI())->unset(2686978ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
277 return getObjectInstance().isSet(2686977ul, opflex::modb::PropertyInfo::STRING);
287 return getObjectInstance().getString(2686977ul);
296 const std::string&
getUuid(
const std::string& defaultValue)
298 return getUuid().get_value_or(defaultValue);
311 getTLMutator().modify(getClassId(), getURI())->setString(2686977ul, newValue);
323 getTLMutator().modify(getClassId(), getURI())->unset(2686977ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
333 return getObjectInstance().isSet(2686982ul, opflex::modb::PropertyInfo::STRING);
343 return getObjectInstance().getString(2686982ul);
352 const std::string&
getVmName(
const std::string& defaultValue)
354 return getVmName().get_value_or(defaultValue);
367 getTLMutator().modify(getClassId(), getURI())->setString(2686982ul, newValue);
379 getTLMutator().modify(getClassId(), getURI())->unset(2686982ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
394 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
395 opflex::ofcore::OFFramework& framework,
396 const opflex::modb::URI& uri)
398 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Ep>(framework,
CLASS_ID, uri);
412 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
413 const opflex::modb::URI& uri)
415 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
436 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
437 opflex::ofcore::OFFramework& framework,
438 const std::string& eprL2EpContext,
439 const opflex::modb::MAC& eprL2EpMac)
441 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
461 static boost::optional<boost::shared_ptr<modelgbp::epr::L2Ep> >
resolve(
462 const std::string& eprL2EpContext,
463 const opflex::modb::MAC& eprL2EpMac)
465 return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac);
480 const std::string& gbpeAttestationName)
498 const std::string& gbpeAttestationName)
500 boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
501 CLASS_ID, getURI(), 2150170660ul, 36,
502 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
504 result->setName(gbpeAttestationName);
524 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
525 getFramework(),
CLASS_ID, getURI(), 2150170660ul, 36, out);
540 const std::string& spanLocalEpFromEpRTgtSource)
558 const std::string& spanLocalEpFromEpRTgtSource)
560 boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
561 CLASS_ID, getURI(), 2150170678ul, 54,
562 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
564 result->setSource(spanLocalEpFromEpRTgtSource);
584 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
585 getFramework(),
CLASS_ID, getURI(), 2150170678ul, 54, out);
600 const std::string& eprSecurityGroupContextSecGroup)
618 const std::string& eprSecurityGroupContextSecGroup)
620 boost::shared_ptr<modelgbp::epr::SecurityGroupContext> result = addChild<modelgbp::epr::SecurityGroupContext>(
621 CLASS_ID, getURI(), 2150170705ul, 81,
622 opflex::modb::URIBuilder(getURI()).addElement(
"EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build()
624 result->setSecGroup(eprSecurityGroupContextSecGroup);
644 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::SecurityGroupContext>(
645 getFramework(),
CLASS_ID, getURI(), 2150170705ul, 81, out);
660 const std::string& eprL3NetIp)
662 return modelgbp::epr::L3Net::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"EprL3Net").addElement(eprL3NetIp).build());
678 const std::string& eprL3NetIp)
680 boost::shared_ptr<modelgbp::epr::L3Net> result = addChild<modelgbp::epr::L3Net>(
681 CLASS_ID, getURI(), 2150170707ul, 83,
682 opflex::modb::URIBuilder(getURI()).addElement(
"EprL3Net").addElement(eprL3NetIp).build()
684 result->setIp(eprL3NetIp);
704 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::L3Net>(
705 getFramework(),
CLASS_ID, getURI(), 2150170707ul, 83, out);
718 getTLMutator().remove(
CLASS_ID, getURI());
731 static void remove(opflex::ofcore::OFFramework& framework,
732 const opflex::modb::URI& uri)
734 MO::remove(framework,
CLASS_ID, uri);
747 static void remove(
const opflex::modb::URI& uri)
749 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
769 opflex::ofcore::OFFramework& framework,
770 const std::string& eprL2EpContext,
771 const opflex::modb::MAC& eprL2EpMac)
773 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
793 const std::string& eprL2EpContext,
794 const opflex::modb::MAC& eprL2EpMac)
796 remove(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac);
811 opflex::ofcore::OFFramework& framework,
812 opflex::modb::ObjectListener* listener)
814 opflex::modb::mointernal
815 ::MO::registerListener(framework, listener,
CLASS_ID);
830 opflex::modb::ObjectListener* listener)
842 opflex::ofcore::OFFramework& framework,
843 opflex::modb::ObjectListener* listener)
845 opflex::modb::mointernal
846 ::MO::unregisterListener(framework, listener,
CLASS_ID);
856 opflex::modb::ObjectListener* listener)
866 opflex::ofcore::OFFramework& framework,
867 const opflex::modb::URI& uri,
868 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
869 : MO(framework,
CLASS_ID, uri, oi) { }
874 #endif // GI_EPR_L2EP_HPP
bool isVmNameSet()
Check whether vmName has been set.
Definition: L2Ep.hpp:331
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:461
modelgbp::epr::L2Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:309
modelgbp::epr::L2Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L2Ep.hpp:321
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:677
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:829
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L2Ep.hpp:60
modelgbp::epr::L2Ep & setVmName(const std::string &newValue)
Set vmName to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:365
modelgbp::epr::L2Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L2Ep.hpp:153
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:436
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L2Ep.hpp:116
modelgbp::epr::L2Ep & unsetInterfaceName()
Unset interfaceName in the currently-active mutator.
Definition: L2Ep.hpp:209
modelgbp::epr::L2Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:85
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:497
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:184
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:352
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:394
boost::optional< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > resolveEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Retrieve the child object with the specified naming properties.
Definition: L2Ep.hpp:599
modelgbp::epr::L2Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:253
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L2Ep.hpp:284
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:522
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:557
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:841
modelgbp::epr::L2Ep & unsetVmName()
Unset vmName in the currently-active mutator.
Definition: L2Ep.hpp:377
modelgbp::epr::L2Ep & setInterfaceName(const std::string &newValue)
Set interfaceName to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:197
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: L2Ep.hpp:228
bool isMacSet()
Check whether mac has been set.
Definition: L2Ep.hpp:219
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:659
modelgbp::epr::L2Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L2Ep.hpp:265
bool isContextSet()
Check whether context has been set.
Definition: L2Ep.hpp:51
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:539
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:72
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L2Ep.hpp:855
static boost::optional< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecurityGroupContext from the managed object store.
Definition: SecurityGroupContext.hpp:154
boost::shared_ptr< modelgbp::epr::SecurityGroupContext > addEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L2Ep.hpp:617
void resolveEprSecurityGroupContext(std::vector< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epr::SecurityGroupContext.
Definition: L2Ep.hpp:642
modelgbp::epr::L2Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L2Ep.hpp:141
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:296
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:240
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:865
boost::optional< const std::string & > getVmName()
Get the value of vmName if it has been set.
Definition: L2Ep.hpp:340
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:582
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:107
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:810
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:702
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:479
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L2Ep.
Definition: L2Ep.hpp:45
modelgbp::epr::L2Ep & unsetContext()
Unset context in the currently-active mutator.
Definition: L2Ep.hpp:97
bool isUuidSet()
Check whether uuid has been set.
Definition: L2Ep.hpp:275
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:128
bool isInterfaceNameSet()
Check whether interfaceName has been set.
Definition: L2Ep.hpp:163
boost::optional< const std::string & > getInterfaceName()
Get the value of interfaceName if it has been set.
Definition: L2Ep.hpp:172
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:412