11#ifndef GI_EPR_L3NET_HPP
12#define GI_EPR_L3NET_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"
26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 100;
41 return getObjectInstance().isSet(3276801ul, opflex::modb::PropertyInfo::STRING);
48 boost::optional<const std::string&>
getIp()
51 return getObjectInstance().getString(3276801ul);
60 const std::string&
getIp(
const std::string& defaultValue)
62 return getIp().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setString(3276801ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(3276801ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
102 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Net> >
resolve(
103 opflex::ofcore::OFFramework& framework,
104 const opflex::modb::URI& uri)
106 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Net>(framework,
CLASS_ID, uri);
120 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Net> >
resolve(
121 const opflex::modb::URI& uri)
123 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Net>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
146 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Net> >
resolve(
147 opflex::ofcore::OFFramework& framework,
148 const std::string& eprL2EpContext,
149 const opflex::modb::MAC& eprL2EpMac,
150 const std::string& eprL3NetIp)
152 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).addElement(
"EprL3Net").addElement(eprL3NetIp).build());
174 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Net> >
resolve(
175 const std::string& eprL2EpContext,
176 const opflex::modb::MAC& eprL2EpMac,
177 const std::string& eprL3NetIp)
179 return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac,eprL3NetIp);
194 const std::string& gbpeAttestationName)
212 const std::string& gbpeAttestationName)
214 OF_SHARED_PTR<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
215 CLASS_ID, getURI(), 2150760495ul, 47,
216 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
218 result->setName(gbpeAttestationName);
238 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
239 getFramework(),
CLASS_ID, getURI(), 2150760495ul, 47, out);
252 getTLMutator().remove(
CLASS_ID, getURI());
265 static void remove(opflex::ofcore::OFFramework& framework,
266 const opflex::modb::URI& uri)
268 MO::remove(framework,
CLASS_ID, uri);
281 static void remove(
const opflex::modb::URI& uri)
283 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
305 opflex::ofcore::OFFramework& framework,
306 const std::string& eprL2EpContext,
307 const opflex::modb::MAC& eprL2EpMac,
308 const std::string& eprL3NetIp)
310 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).addElement(
"EprL3Net").addElement(eprL3NetIp).build());
332 const std::string& eprL2EpContext,
333 const opflex::modb::MAC& eprL2EpMac,
334 const std::string& eprL3NetIp)
336 remove(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac,eprL3NetIp);
351 opflex::ofcore::OFFramework& framework,
352 opflex::modb::ObjectListener* listener)
354 opflex::modb::mointernal
355 ::MO::registerListener(framework, listener,
CLASS_ID);
370 opflex::modb::ObjectListener* listener)
382 opflex::ofcore::OFFramework& framework,
383 opflex::modb::ObjectListener* listener)
385 opflex::modb::mointernal
386 ::MO::unregisterListener(framework, listener,
CLASS_ID);
396 opflex::modb::ObjectListener* listener)
406 opflex::ofcore::OFFramework& framework,
407 const opflex::modb::URI& uri,
408 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
409 : MO(framework,
CLASS_ID, uri, oi) { }
bool isIpSet()
Check whether ip has been set.
Definition L3Net.hpp:39
static boost::optional< OF_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
void remove()
Remove this instance using the currently-active mutator.
Definition L3Net.hpp:250
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition L3Net.hpp:48
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Net.
Definition L3Net.hpp:33
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition L3Net.hpp:395
void resolveGbpeAttestation(std::vector< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition L3Net.hpp:236
modelgbp::epr::L3Net & unsetIp()
Unset ip in the currently-active mutator.
Definition L3Net.hpp:85
static void remove(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &eprL3NetIp)
Remove the L3Net object with the specified path elements from the managed object store using the defa...
Definition L3Net.hpp:331
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the L3Net object with the specified URI using the currently-active mutator.
Definition L3Net.hpp:265
static void remove(opflex::ofcore::OFFramework &framework, const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &eprL3NetIp)
Remove the L3Net object with the specified path elements from the managed object store.
Definition L3Net.hpp:304
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L3Net > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &eprL3NetIp)
Retrieve an instance of L3Net from the managed object store by constructing its URI from the path ele...
Definition L3Net.hpp:146
L3Net(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L3Net.
Definition L3Net.hpp:405
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L3Net > > resolve(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &eprL3NetIp)
Retrieve an instance of L3Net from the default managed object store by constructing its URI from the ...
Definition L3Net.hpp:174
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition L3Net.hpp:193
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition L3Net.hpp:60
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition L3Net.hpp:381
modelgbp::epr::L3Net & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition L3Net.hpp:73
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L3Net > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L3Net from the managed object store using the default framework instance.
Definition L3Net.hpp:120
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 L3Net.hpp:350
OF_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 L3Net.hpp:211
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 L3Net.hpp:369
static void remove(const opflex::modb::URI &uri)
Remove the L3Net object with the specified URI using the currently-active mutator and the default fra...
Definition L3Net.hpp:281
static boost::optional< OF_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
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12