This is user created, non-prepaid, network specific, re-usable resource.
Definition at line 201 of file ipaddress.h.
typedef std::list<AssignedIp4> OSB_LIB::IpGroup::AssignedIp4s |
The direction of the assignment of an IP address.
dirUnknown | Unknown direction of IP assignment. |
dirIn | Incoming IP assignment. |
dirOut | Outgoing IP assignment. |
Definition at line 214 of file ipaddress.h.
Constructor with resource number and optional network id.
rn | The resource number. | |
nw | The id of the network that owns the IP group. |
bool OSB_LIB::IpGroup::addIp4 | ( | const OSB_DB::Session & | session, | |
const Date & | start, | |||
Ip4Address & | ip4, | |||
Direction | dir | |||
) |
Assign an IP4 to an IP group.
session | Database session to use. | |
start | Start date of assignment period. | |
ip4 | IP4 to assign. | |
dir | Direction to assign. |
OsbException |
|
bool OSB_LIB::IpGroup::assign | ( | const AssignedIp4 & | assignedIp4 | ) | [private] |
Add an IP4 address to the group.
assignedIp4 | Assigned ip4Address object to added. |
const AssignedIp4s& OSB_LIB::IpGroup::assignedIp4s | ( | ) | const |
List with the id's of the assigned IP4 addresses.
bool OSB_LIB::IpGroup::changeIp4Status | ( | const OSB_DB::Session & | session, | |
Ip4Address & | ip4 | |||
) | const [private] |
Change the status of an IP4 address.
session | Database session to use. | |
ip4 | IP4 address for which to change the status. |
const AssignedIp4s OSB_LIB::IpGroup::curAssignedIp4s | ( | ) | const |
List with current assigned IP4 addresses.
bool OSB_LIB::IpGroup::deassign | ( | const Ip4Address & | ip4, | |
Direction | dir | |||
) | [private] |
Deassign an IP4 address from the group.
Set the end date of the assignment to the current date, also update the IP4 object in list.
ip4 | IP4 address to be deassigned. | |
dir | Deassigned direction. |
bool OSB_LIB::IpGroup::delIp4 | ( | const OSB_DB::Session & | session, | |
Ip4Address & | ip4, | |||
Direction | dir | |||
) |
Deassign an IP4 from an IP group.
session | Database session to use. | |
ip4 | IP4 to deassign. | |
dir | Direction to deassign. |
OsbException | if the id of previously assigned IP group does not match the current IP group. |
const std::string& OSB_LIB::IpGroup::des | ( | ) | const |
Description.
static Direction OSB_LIB::IpGroup::direction | ( | char | c | ) | [static] |
Convert a char to direction.
c | Value to convert. |
bool OSB_LIB::IpGroup::insert | ( | const OSB_DB::Session & | session | ) | [virtual] |
Insert the resource into the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
bool OSB_LIB::IpGroup::read | ( | const OSB_DB::Session & | session | ) | [virtual] |
Read the resource from the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
bool OSB_LIB::IpGroup::remove | ( | const OSB_DB::Session & | session | ) | [virtual] |
Delete the resource from the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
void OSB_LIB::IpGroup::setDes | ( | const std::string & | des | ) |
Set the description.
void OSB_LIB::IpGroup::sortIp4sByPriority | ( | ) |
Ascending sort of assigned IP4 addresses by priority:
void OSB_LIB::IpGroup::sortIp4sByResNum | ( | bool | desc = false |
) |
Sort assigned IP4 addresses by resource number.
desc | Flag to sort in descending (true) or ascending (false) order. |
static char OSB_LIB::IpGroup::toChar | ( | Direction | dir | ) | [static] |
Convert a direction into a char.
dir | Direction to convert. |
Type OSB_LIB::IpGroup::typeId | ( | ) | const [virtual] |
void OSB_LIB::IpGroup::updData | ( | const OSB_DB::Session & | session | ) | [virtual] |
Update the resource in the database.
session | Database session to use. |
OsbException | from lock(). | |
OsbException | from incObjVs(). |
Implements OSB_LIB::Resource.
friend class OSB_DB::IpGroupGw [friend] |
AssignedIp4s OSB_LIB::IpGroup::assignedIp4s_ [private] |
std::string OSB_LIB::IpGroup::des_ [private] |
const Type OSB_LIB::IpGroup::typeId_ = rtIpGroup [static, private] |