by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    marzmesas
    @marzmesas
    Hi @gabrik , another quick question. At this link https://fog05.io/docs/getting-started/etsi-osm-interop/ , you guys establish one of the vim account parameters as <zenoh server ip>:7447 , yet at this link from the OSM site https://osm.etsi.org/wikipub/index.php/Eclipse_fog05#Upload_Images we can find the same parameter as <rest proxy ip>:8080
    Could you clarify for me which of these two configurations would be correct? Thank you!
    Gabriele Baldoni
    @gabrik
    Hi @marzmesas, you can use the one with <zenoh server ip>:7447 regarding the api you should only pass the image descriptor, so it will be api.image.add(img_descriptor)
    marzmesas
    @marzmesas
    Hi @gabrik , is the zenoh server ip the same as the yaks ip? If not, where can I find such ip address?
    Gabriele Baldoni
    @gabrik
    Yes it is the same
    marzmesas
    @marzmesas
    Perfect, I had another question regarding the VNF. The only thing to be packaged into a tar.gz in order to instantiate the VNF would be the alpine-vnf.yaml , where the name of the image would be the name of the image we have previously uploaded? That's the way?
    Gabriele Baldoni
    @gabrik
    Yes that’s the way
    marzmesas
    @marzmesas
    Regarding this, in the OSM Fog05 link ( https://osm.etsi.org/wikipub/index.php/Eclipse_fog05#Upload_Images ) we can find that the image is referenced under a different name as the one in the fog05 website. In the OSM website I think they reference it with the uuid of the image. Is that the way to reference the image in the vnfd yaml?
    Gabriele Baldoni
    @gabrik
    It should work in both ways, but using the name is the correct way in general
    marzmesas
    @marzmesas
    Hi @gabrik , I was trying to upload the image but I came around a dumb question. In order to upload the image, can we do it through the bash command line or do we have to run a python script to access the FDU api?
    Gabriele Baldoni
    @gabrik
    Hi @marzmesas at this time there is no command line interface so you need to use the APIs.
    marzmesas
    @marzmesas
    So we pretty much should use a script like the one created to run the helloworld example?
    Gabriele Baldoni
    @gabrik
    Yes, but you just need to register the image, using the api.image.add API
    marzmesas
    @marzmesas
    yes, so it'd basically be a python program that ran that instruction
    Gabriele Baldoni
    @gabrik
    Yes, excatly
    marzmesas
    @marzmesas
    Where can I find the methods of the api.image class ? so I can know how to get a log printed out of the result of api.image.add
    Gabriele Baldoni
    @gabrik
    marzmesas
    @marzmesas
    Hi Gabriele, after trying some things I got this error coming up. Here are my descriptor and the python script to upload the image as well as the error popping up when executing the script
    Captura.PNG
    Captura1.PNG
    Captura2.PNG
    Do you have any ideas on how to solve this?
    Gabriele Baldoni
    @gabrik
    You have to pass the dict object to the API not the descriptor file, so you should read the file content into a dict and then pass it to the API
    Like it is done for the HelloWorld example
    Gabriele Baldoni
    @gabrik
    So it should be like this:
    import json
    from fog05 import FIMAPI 
    
    def read_file(filepath):
        with open(filepath, 'r') as f:
            data = f.read()
        return data
    
    api = FIMAPI()
    Img_desc = json.loads(read_file(<path to json descriptor>))
    res = api.image.add(img_desc)
    print(res)
    api.close()
    marzmesas
    @marzmesas
    Hi @gabrik , this is the script I ran, with the exact descriptor y previously sent
    image.png
    And these were the errors it reported
    image.png
    Could you help me out with that?
    Gabriele Baldoni
    @gabrik
    Can you print the content of img_desc?
    marzmesas
    @marzmesas
    Hi @gabrik , this is what I get when I change the script for it to print img_desc
    image.png
    Gabriele Baldoni
    @gabrik
    Ok, it seems ok, because the id is added by the API if it is not present. Can you confirm you are using version 0.2.1 of the APIs?
    marzmesas
    @marzmesas
    How can I do so?
    Gabriele Baldoni
    @gabrik
    pip3 list | grep fog
    marzmesas
    @marzmesas
    I checked and it seems to be running 0.2.0
    image.png
    Gabriele Baldoni
    @gabrik
    Ok, let me check for that version, maybe there was a bug
    marzmesas
    @marzmesas
    Sure, if not just let me know how and I'll update it to 0.2.1
    Gabriele Baldoni
    @gabrik
    Ok this was one of the issue solved with 0.2.1, to update just run
    pip3 uninstall fog05==0.2.0 -y
    pip3 install fog05==0.2.1
    marzmesas
    @marzmesas
    Just installed it, ran the original program and this came up
    image.png
    Gabriele Baldoni
    @gabrik
    Strange, I’m on it
    marzmesas
    @marzmesas
    Awesome, let me know on any updates
    Thank you!
    Gabriele Baldoni
    @gabrik
    We found a small bug in that API, the simple workaround is to populate the uuid file of the descriptor with valid uuid, you can get one using uuidgen
    marzmesas
    @marzmesas
    Is it a class that I can find in the API?
    Or could you give me an example on it by any chance?
    Gabriele Baldoni
    @gabrik

    It is an utility in Linux, so you can just open a terminal and type uuidgen the result should be like this:

    $ uuidgen
    25843eb9-82c5-4bd6-b6c6-5df22766b5eb

    Then copy and paste this uuid in the image descriptor in the uuid field.

    It should become like this:

    { 
        “name”:”alpine”,
        “uuid”:"25843eb9-82c5-4bd6-b6c6-5df22766b5eb”,
        “uri”:”lxd://alpine/edge”,
        “checksum”:””,
        “format”:””
    }
    marzmesas
    @marzmesas
    Once I did that, the image did work