# /var/lib/one/remotes/ipam/dummy/\* for testing IPAM

**URL:** <https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005>\
**Category:** Product Support\
**Created:** [November 20, 2020, 12:45am UTC](https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005 "2020-11-20T00:45:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![christaylor](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/christaylor/32/6719_2.png) [@christaylor](https://forum.opennebula.io/u/christaylor)\
**Post date:** [November 20, 2020, 12:45am UTC](https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005/1 "2020-11-20T00:45:45Z")

</div>

Can I use the dummy drivers to test the IPAM driver? I’m getting some strange results, I must be doing something wrong. I have this XML:

```auto
$ cat net1.xml
<IPAM_DRIVER_ACTION_DATA>
<AR>
  <TYPE>IP4</TYPE>
  <IP>10.123.0.10</IP>
  <SIZE>50</SIZE>
</AR>
</IPAM_DRIVER_ACTION_DATA>

```

I get:

```auto
$ base64 net1.xml | /var/lib/one/remotes/ipam/dummy/register_address_range
Traceback (most recent call last):
        4: from /var/lib/one/remotes/ipam/dummy/../../datastore/xpath.rb:62:in `<main>'
        3: from /var/lib/one/remotes/ipam/dummy/../../datastore/xpath.rb:62:in `new'
        2: from /usr/share/ruby/rexml/document.rb:45:in `initialize'
        1: from /usr/share/ruby/rexml/document.rb:288:in `build'
/usr/share/ruby/rexml/parsers/treeparser.rb:28:in `parse': No close tag for /IPAM_DRIVER_ACTION_DATA/AR/IP (REXML::ParseException)
Line: 4
Position: 57
Last 80 unconsumed characters:
        AR=[
          TYPE="IP4",
          IP ="10.0.0.1",
          SIZE="100",
          NETWORK_MASK="255.255.255.0",
          GATEWAY="10.0.0.1",
          DNS="10.0.0.1",
          IPAM_MAD="dummy"
        ]

```

I have this block in /etc/one/oned.conf and opennebula has been restarted:

```auto
IPAM_MAD = [
    EXECUTABLE = "one_ipam",
    ARGUMENTS = "-t 1 -i dummy"
]

```

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [November 20, 2020, 9:25am UTC](https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005/2 "2020-11-20T09:25:56Z")

</div>

Hello @christaylor

Yes, this dummy IPAM is for demo purpose, you have to it in the following way:

```auto
base64 net1.xml -w 0 | /var/lib/one/remotes/ipam/dummy/register_address_range

```

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![christaylor](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/christaylor/32/6719_2.png) [@christaylor](https://forum.opennebula.io/u/christaylor)\
**Post date:** [November 20, 2020, 7:43pm UTC](https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005/3 "2020-11-20T19:43:01Z")

</div>

That worked! Thanks-

Using this template,

```auto
$ cat tmp.xml
<IPAM_DRIVER_ACTION_DATA>
<AR>
  <TYPE>IP4</TYPE>
  <MAC></MAC>
  <NETWORK_ADDRESS>10.123.0.0</NETWORK_ADDRESS>
  <NETWORK_MASK>23</NETWORK_MASK>
  <IP>10.123.0.10</IP>
  <SIZE>50</SIZE>
  <GATEWAY>10.123.0.1</GATEWAY>
  <DNS>10.0.0.2 10.0.0.3</DNS>
  <GUEST_MTU>1500</GUEST_MTU>
  <SEARCH_DOMAIN>usc.edu</SEARCH_DOMAIN>
</AR>
</IPAM_DRIVER_ACTION_DATA>

```

I get this back:

```auto
$ base64 tmp.xml -w 0 | /var/lib/one/remotes/ipam/dummy/register_address_range
        AR=[
          TYPE="IP4",
          SIZE="50",
          IP="10.123.0.10",
          IPAM_MAD="dummy"
        ]

```

Is it expected behavior for it not to return the extra stuff I fed it like GATEWAY and DNS?

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [November 23, 2020, 8:31am UTC](https://forum.opennebula.io/t/var-lib-one-remotes-ipam-dummy-for-testing-ipam/9005/4 "2020-11-23T08:31:11Z")

</div>

Hello @christaylor

Yes, that is the expected behavior, you can customize that output depending on your needs.

Best,  
Álex.
