Menu

need help with oql query with teemIP

GuillaumeF
2022-02-09
2022-02-09
  • GuillaumeF

    GuillaumeF - 2022-02-09

    Hello,

    I've have made some change in the class Location this is what is needed for my query:
    <field id="user-content-networkip" xsi:type="AttributeExternalKey" _delta="define">
    <sql>networkip</sql>
    <is_null_allowed>false</is_null_allowed>
    <on_target_delete>DEL_MANUAL</on_target_delete>
    <target_class>IPv4Subnet</target_class>
    </field>

    in other class i need an oql query for the filter for the field:
    <field id="user-content-iplan" xsi:type="AttributeExternalKey">
    <sql>iplan</sql>
    <is_null_allowed>false</is_null_allowed>
    <on_target_delete>DEL_MANUAL</on_target_delete>
    <target_class>IPv4Address</target_class>
    </field>

    But i don't make a succesful query with oql.

    When i try with the OQL request in iTop:
    SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3

    iTop say it's an error:
    Wrong format for Join clause (right hand), expecting an id, found 'subnet_id' in: SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3, expecting {id}

    So i need to select in the list ip address wich is in the subnet associated with the location.

     
  • Guillaume Lajarige

    Hello Guillaume,

    You should post directly in the TeemIP forum, @xtophe38 and the TeemIP community might be more able to help you :)

    Cheers,
    Guillaume

     
  • GuillaumeF

    GuillaumeF - 2022-02-09

    I will copy the post in teemIP forum.
    Thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.