Git Product home page Git Product logo

Comments (2)

maro5397 avatar maro5397 commented on July 30, 2024

아래 코드는 테스트를 위해 사용한 AE 생성 시 ACP를 적용하는 코드입니다.
하지만 ACP가 올바르게 적용되지 않는 것을 확인할 수 있습니다.

============================================

def createApplicationEntity(AEname, serverURL, role):
    header = {
        "Accept":"application/json",
        "X-M2M-RI":"3408",
        "X-M2M-Origin":role,
        "Content-Type":"application/json;ty=2"
    }
    body = {
        "m2m:ae":{
            "rn":AEname,
            "api":"ID_api_raleeshinjo",
            "lbl":["key1","key2"],
            "rr": True,
            "poa":["MQTT|"],
            "acpi":["Mobius/"+acpi] #acp를 추가하기 위한 속성
        }
    }
    res = requests.post(serverURL+"/Mobius", headers=header, json=body)
    print(res.json())

============================================

확인해주셔서 감사합니다.

from mobius.

maro5397 avatar maro5397 commented on July 30, 2024

아래 코드는 테스트를 위해 사용한 AE 삭제 시 role값을 주는 코드입니다.
하지만 ACP가 올바르게 적용되지 않아 삭제되지 않는 것을 확인할 수 있습니다.

============================================

def removeApplicationEntity(serverURL, AEname, role):
    ri = getApplicationEntityRI(serverURL, AEname, role)

    header = {
        "Accept":"application/json",
        "X-M2M-RI": ri_value, #이때 AE 자체의 ri, INCSE 자체의 ri 모두 사용해보았지만 삭제되지 않았음 
        "X-M2M-Origin": role,
    }
    res = requests.delete(serverURL+"/Mobius/"+AEname, headers=header, data="")
    res = res.json()
    print(res)

============================================

확인해주셔서 감사합니다.

from mobius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.