Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new built-in function feature for remote cmd #1619

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

seokho-son
Copy link
Member

@seokho-son seokho-son commented Jun 12, 2024

원격 커맨드 요청 body를 통한, built-in function 기능 제공

  • $$Func 로 키워드가 시작되는 경우, 빌트인 함수를 찾고 치환
    • GetPublicIP(): MCIS의 특정 VM의 Public IP로 치환
    • GetPublicIPs(): MCIS의 모든 VM들의 Public IP 리스트로 치환 (구분자 지정 가능)
  • 리소스 지정 키워드 지원
    • target=this는, SSH가 실행되는 VM 또는 MCIS 자신을 의미함
    • target=mcis.vm VM을 지정하기 위해서 MCISID.VMID를 .로 이어서 입력함.
  • 빌트인 함수내 파라미터 구분
    • ,로 파라미터 구분
  • 빌트인 함수내 기타 데코레이터 지원
    • separator: 구분자 (특수문자가 있는 경우 ' '로 감싸서 적용)
    • prefix: 앞에 붙는 스트링
    • postfix: 뒤에 붙는 스트링

예시

GUI 지원

MapUI에서 기능 시험 가능

image

(결과)
mcisId:"mc-0p8tp"
vmId:"g1-1"
vmIp:"43.203.252.48"

command:Object
0:"echo 43.203.252.48"
1:"echo http://43.203.252.48:3000"
2:"echo http://43.203.252.48:3000"
3:"echo http://18.118.95.81:3000Xhttp://3.21.93.182:3000Xhttp://3.135.198.53:3000"

stdout:Object
0:"43.203.252.48"
1:"http://43.203.252.48:3000"
2:"http://43.203.252.48:3000"
3:"http://18.118.95.81:3000Xhttp://3.21.93.182:3000Xhttp://3.135.198.53:3000"

@seokho-son
Copy link
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Jun 12, 2024
@cb-github-robot cb-github-robot merged commit 4a21d95 into cloud-barista:main Jun 12, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants