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"
28 #include "modelgbp/epr/SecurityGroupContext.hpp"
34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 84;
49 return getObjectInstance().isSet(2752517ul, opflex::modb::PropertyInfo::STRING);
59 return getObjectInstance().getString(2752517ul);
68 const std::string&
getContext(
const std::string& defaultValue)
70 return getContext().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(2752517ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(2752517ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
105 return getObjectInstance().isSet(2752515ul, opflex::modb::PropertyInfo::STRING);
115 return getObjectInstance().getString(2752515ul);
124 const std::string&
getGroup(
const std::string& defaultValue)
126 return getGroup().get_value_or(defaultValue);
139 getTLMutator().modify(getClassId(), getURI())->setString(2752515ul, newValue);
151 getTLMutator().modify(getClassId(), getURI())->unset(2752515ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
161 return getObjectInstance().isSet(2752516ul, opflex::modb::PropertyInfo::STRING);
168 boost::optional<const std::string&>
getIp()
171 return getObjectInstance().getString(2752516ul);
180 const std::string&
getIp(
const std::string& defaultValue)
182 return getIp().get_value_or(defaultValue);
195 getTLMutator().modify(getClassId(), getURI())->setString(2752516ul, newValue);
207 getTLMutator().modify(getClassId(), getURI())->unset(2752516ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
217 return getObjectInstance().isSet(2752514ul, opflex::modb::PropertyInfo::MAC);
224 boost::optional<const opflex::modb::MAC&>
getMac()
227 return getObjectInstance().getMAC(2752514ul);
236 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
238 return getMac().get_value_or(defaultValue);
251 getTLMutator().modify(getClassId(), getURI())->setMAC(2752514ul, newValue);
263 getTLMutator().modify(getClassId(), getURI())->unset(2752514ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
273 return getObjectInstance().isSet(2752513ul, opflex::modb::PropertyInfo::STRING);
283 return getObjectInstance().getString(2752513ul);
292 const std::string&
getUuid(
const std::string& defaultValue)
294 return getUuid().get_value_or(defaultValue);
307 getTLMutator().modify(getClassId(), getURI())->setString(2752513ul, newValue);
319 getTLMutator().modify(getClassId(), getURI())->unset(2752513ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
334 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
335 opflex::ofcore::OFFramework& framework,
336 const opflex::modb::URI& uri)
338 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(framework,
CLASS_ID, uri);
352 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
353 const opflex::modb::URI& uri)
355 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
376 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
377 opflex::ofcore::OFFramework& framework,
378 const std::string& eprL3EpContext,
379 const std::string& eprL3EpIp)
381 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EprL3Universe").addElement(
"EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
401 static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> >
resolve(
402 const std::string& eprL3EpContext,
403 const std::string& eprL3EpIp)
405 return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
420 const std::string& gbpeAttestationName)
438 const std::string& gbpeAttestationName)
440 boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
441 CLASS_ID, getURI(), 2150236196ul, 36,
442 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
444 result->setName(gbpeAttestationName);
464 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
465 getFramework(),
CLASS_ID, getURI(), 2150236196ul, 36, out);
480 const std::string& spanLocalEpFromEpRTgtSource)
498 const std::string& spanLocalEpFromEpRTgtSource)
500 boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
501 CLASS_ID, getURI(), 2150236214ul, 54,
502 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
504 result->setSource(spanLocalEpFromEpRTgtSource);
524 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
525 getFramework(),
CLASS_ID, getURI(), 2150236214ul, 54, out);
540 const std::string& eprSecurityGroupContextSecGroup)
558 const std::string& eprSecurityGroupContextSecGroup)
560 boost::shared_ptr<modelgbp::epr::SecurityGroupContext> result = addChild<modelgbp::epr::SecurityGroupContext>(
561 CLASS_ID, getURI(), 2150236241ul, 81,
562 opflex::modb::URIBuilder(getURI()).addElement(
"EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build()
564 result->setSecGroup(eprSecurityGroupContextSecGroup);
584 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::SecurityGroupContext>(
585 getFramework(),
CLASS_ID, getURI(), 2150236241ul, 81, out);
598 getTLMutator().remove(
CLASS_ID, getURI());
611 static void remove(opflex::ofcore::OFFramework& framework,
612 const opflex::modb::URI& uri)
614 MO::remove(framework,
CLASS_ID, uri);
627 static void remove(
const opflex::modb::URI& uri)
629 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
649 opflex::ofcore::OFFramework& framework,
650 const std::string& eprL3EpContext,
651 const std::string& eprL3EpIp)
653 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"EprL3Universe").addElement(
"EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
673 const std::string& eprL3EpContext,
674 const std::string& eprL3EpIp)
676 remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
691 opflex::ofcore::OFFramework& framework,
692 opflex::modb::ObjectListener* listener)
694 opflex::modb::mointernal
695 ::MO::registerListener(framework, listener,
CLASS_ID);
710 opflex::modb::ObjectListener* listener)
722 opflex::ofcore::OFFramework& framework,
723 opflex::modb::ObjectListener* listener)
725 opflex::modb::mointernal
726 ::MO::unregisterListener(framework, listener,
CLASS_ID);
736 opflex::modb::ObjectListener* listener)
746 opflex::ofcore::OFFramework& framework,
747 const opflex::modb::URI& uri,
748 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
749 : MO(framework,
CLASS_ID, uri, oi) { }
754 #endif // GI_EPR_L3EP_HPP
bool isIpSet()
Check whether ip has been set.
Definition: L3Ep.hpp:159
bool isContextSet()
Check whether context has been set.
Definition: L3Ep.hpp:47
modelgbp::epr::L3Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L3Ep.hpp:149
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:376
modelgbp::epr::L3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: L3Ep.hpp:205
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:419
bool isUuidSet()
Check whether uuid has been set.
Definition: L3Ep.hpp:271
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:352
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:124
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: L3Ep.hpp:168
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:68
modelgbp::epr::L3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:193
modelgbp::epr::L3Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:137
modelgbp::epr::L3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:249
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L3Ep.hpp:735
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: L3Ep.hpp:557
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:522
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L3Ep.hpp:721
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L3Ep.hpp:56
bool isGroupSet()
Check whether group has been set.
Definition: L3Ep.hpp:103
boost::optional< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > resolveEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:539
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:292
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L3Ep.hpp:280
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:236
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: L3Ep.hpp:582
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:709
modelgbp::epr::L3Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:81
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:224
modelgbp::epr::L3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L3Ep.hpp:317
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:437
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:479
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Ep.
Definition: L3Ep.hpp:41
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:334
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
modelgbp::epr::L3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L3Ep.hpp:261
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:745
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:180
modelgbp::epr::L3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:305
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:401
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:690
bool isMacSet()
Check whether mac has been set.
Definition: L3Ep.hpp:215
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:497
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:462
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:93
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L3Ep.hpp:112