VirtualBox

Changeset 81398 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 21, 2019 11:18:35 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134111
Message:

bugref:9589. OCI: Added public SSH key support during instance creation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp

    r81119 r81398  
    480480        { "--privateip",      'P', RTGETOPT_REQ_STRING },
    481481        { "--launch",         'l', RTGETOPT_REQ_STRING },
     482        { "--public-ssh-key", 'k', RTGETOPT_REQ_STRING },
    482483    };
    483484    RTGETOPTSTATE GetState;
     
    496497    ComPtr<IVirtualSystemDescription> pVSD = virtualSystemDescriptions[0];
    497498
    498     Utf8Str strDisplayName, strImageId, strBootVolumeId;
     499    Utf8Str strDisplayName, strImageId, strBootVolumeId, strPublicSSHKey;
    499500    int c;
    500501    while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0)
     
    565566                    break;
    566567                }
     568            case 'k':
     569                strPublicSSHKey = ValueUnion.psz;
     570                pVSD->AddDescription(VirtualSystemDescriptionType_CloudPublicSSHKey,
     571                                     Bstr(ValueUnion.psz).raw(),
     572                                     Bstr(ValueUnion.psz).raw());
     573                break;
    567574            case VINF_GETOPT_NOT_OPTION:
    568575                return errorUnknownSubcommand(ValueUnion.psz);
     
    571578        }
    572579    }
     580
     581    if (strPublicSSHKey.isEmpty())
     582        RTPrintf("Warning!!! Public SSH key doesn't present in the passed arguments...\n");
    573583
    574584    if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty())
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette