I need to change an IPv4 address to multiple IPv4 addresses using LDIF file. The original LDIF file which was used to create the HSS ESM is the following:
dn: HSS-EsmImsi=312720000000207,HSS-EsmSubscriptionId=BR-02061969,
HSS-EsmSubscriptionContainerName=HSS-EsmSubscriptionContainer,
applicationName=HSS_ESM,nodeName=bnyrgvhss1
changeType: modify
add: HSS-EsmUserProfileId
HSS-EsmUserProfileId: HSS-EsmProfile_APCCI_METERING
-
add: HSS-EsmUserIpV4Address
HSS-EsmUserIpV4Address: 4$10.11.12.13
-
add: HSS-EsmMsisdn
HSS-EsmMsisdn: +1 234 567 8901
-
Now, I need to do 2 things:
- Change the IPv4 address (e.g. 10.13.15.17).
- Modify the HSS ESM User Object Class, so HSS-EsmUserIpV4Address will store multiple IPv4 addresses.
According to Erickson's - ESM LDAP Interface Description this should be done with a string in the following format: [contextId1]$[IPv4-Address1]\n [contextId2]$[IPv4-Address2]\n ...[contextIdNN]$[IPv4-AddressNN]\n.
Legend:
- [contextId] datatype is uint32.
- $ is a CONSTANT (US Dollar sign).
- [IPv4-Address] IP Addresses are dotted-decimal of string datatype, e.g. 10.12.14.16.
- \n is a CONSTANT (New-Line).
I am new to LDAP and will appreciate any help on how the LDIF file should be to so that HSS-EsmUserIpV4Address
will store, for example, the following IPv4 addresses:
2$159.10.1.20
7$159.10.1.21
8$159.10.1.22
I tried to change the LDIF file to do Delete
and Add
like this:
... (the original code)...
changeType: modify
delete: HSS-EsmUserProfileId
-
add: HSS-EsmUserProfileId
HSS-EsmUserProfileId: 2$159.10.1.20\n7$159.10.1.21\n8$159.10.1.22\n
-
But, it didn't work (no error messages, just no change).
I will appreciate any help, I am here (at work) to stay until I make this happen.
First, you're changing the wrong attribute. It should be
and you may have damaged the original value of this attribute, so you need to put it back:
Second, I don't know where you got this format with
\n
separators from. I don't see it in the documentation you cited. The normal LDIF syntax for multiple attribute values would be:Note that this will preserve the prior value starting with
4$
, unless you previously useddelete:
as above.