Giter Club home page Giter Club logo

Comments (2)

powerkimhub avatar powerkimhub commented on May 22, 2024

@dev4unet This is a test on AWS.

from cb-spider.

dev4unet avatar dev4unet commented on May 22, 2024
  1. HTTP req: GET {{spider_ip}}:{{spider_port}}/keypair/{{spider_keypairId}}?connection_name={{connection_name}}
  2. JSON res:
{
    "message": "InvalidKeyPair.NotFound: The key pair 'mcb-keypair' does not exist\n\tstatus code: 400, request id: 376a433a-b57f-4731-95da-5a9745d97231"
}

=> We can see that the keypair with that keypairname does not exist.

  1. HTTP req: DELETE {{spider_ip}}:{{spider_port}}/keypair/{{spider_keypairId}}?connection_name={{connection_name}}
  2. HTTP res:
    true
    (expected false or failed)

AWS API에서 에러로 보지 않고 있어서 저도 True 처리를 했습니다.
보통 키페어 제거는 목록에서 제거할 키페어를 선택 후 삭제를 호출하며...
삭제 요청시 최종 희망사항은 해당 퍼블릭키가 서버에서 제거되는 것을 희망하기 때문에
서버에 요청한 퍼블릭키가 존재하지 않아도 별도의 에러 없이 true를 리턴하고 있는 것 같습니다.

참고로, AWS에서 제공하는 API 자체에서 삭제시 에러가 발생하지 않는...
삭제 요청의 성공 여부를 별도로 알려주지는 않습니다. (리턴 값이 항상 nil입니다.)
즉, 현재는 삭제시 AWS API에서 에러가 발생하지 않은 경우...
삭제 요청은 성공했다고 판단해서 true를 리턴하고 있습니다만...
(요청한 키파일이 서버에 없는 경우에도 삭제 성공으로 간주해서 별도의 에러는 발생하지 않습니다.)
사용자의 키파일의 삭제 요청 시 키파일의 존재를 먼저 체크해서 false를 리턴하도록 수정하겠습니다.

from cb-spider.

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.