File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
internal/namespaces/flexibleip/v1alpha1 Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ func GetGeneratedCommands() *core.Commands {
3131 fipIPDetach (),
3232 fipMacCreate (),
3333 fipMacDuplicate (),
34+ fipMacMove (),
3435 fipMacDelete (),
3536 )
3637}
@@ -491,6 +492,41 @@ func fipMacDuplicate() *core.Command {
491492 }
492493}
493494
495+ func fipMacMove () * core.Command {
496+ return & core.Command {
497+ Short : `Move a virtual MAC` ,
498+ Long : `Move a Virtual MAC from a given Flexible IP onto another Flexible IP.` ,
499+ Namespace : "fip" ,
500+ Resource : "mac" ,
501+ Verb : "move" ,
502+ // Deprecated: false,
503+ ArgsType : reflect .TypeOf (flexibleip.MoveMACAddrRequest {}),
504+ ArgSpecs : core.ArgSpecs {
505+ {
506+ Name : "fip-id" ,
507+ Required : true ,
508+ Deprecated : false ,
509+ Positional : false ,
510+ },
511+ {
512+ Name : "dst-fip-id" ,
513+ Required : false ,
514+ Deprecated : false ,
515+ Positional : false ,
516+ },
517+ core .ZoneArgSpec (scw .ZoneFrPar1 , scw .ZoneFrPar2 , scw .ZoneNlAms1 ),
518+ },
519+ Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
520+ request := args .(* flexibleip.MoveMACAddrRequest )
521+
522+ client := core .ExtractClient (ctx )
523+ api := flexibleip .NewAPI (client )
524+ return api .MoveMACAddr (request )
525+
526+ },
527+ }
528+ }
529+
494530func fipMacDelete () * core.Command {
495531 return & core.Command {
496532 Short : `Remove a virtual MAC from a Flexible IP` ,
You can’t perform that action at this time.
0 commit comments