This commit is contained in:
parent
14916c1544
commit
ff6441dafc
7 changed files with 3 additions and 18 deletions
BIN
comprehensive
Executable file
BIN
comprehensive
Executable file
Binary file not shown.
|
|
@ -360,7 +360,6 @@ func (p *EdgeConnectPlanner) getCurrentInstanceState(ctx context.Context, desire
|
|||
CloudletName: instance.Key.CloudletKey.Name,
|
||||
FlavorName: instance.Flavor.Name,
|
||||
State: instance.State,
|
||||
PowerState: instance.PowerState,
|
||||
Exists: true,
|
||||
LastUpdated: time.Now(), // EdgeConnect doesn't provide this
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,8 +223,7 @@ func TestPlanExistingDeploymentNoChanges(t *testing.T) {
|
|||
Flavor: v2.Flavor{
|
||||
Name: "small",
|
||||
},
|
||||
State: "Ready",
|
||||
PowerState: "PowerOn",
|
||||
State: "Ready",
|
||||
}
|
||||
|
||||
mockClient.On("ShowApp", mock.Anything, mock.AnythingOfType("v2.AppKey"), "US").
|
||||
|
|
|
|||
|
|
@ -170,9 +170,6 @@ type InstanceState struct {
|
|||
// State of the instance (e.g., "Ready", "Pending", "Error")
|
||||
State string
|
||||
|
||||
// PowerState of the instance
|
||||
PowerState string
|
||||
|
||||
// LastUpdated timestamp when the instance was last modified
|
||||
LastUpdated time.Time
|
||||
|
||||
|
|
|
|||
|
|
@ -300,8 +300,7 @@ func TestUpdateAppInstance(t *testing.T) {
|
|||
Name: "testapp",
|
||||
Version: "1.0.0",
|
||||
},
|
||||
Flavor: Flavor{Name: "m4.medium"},
|
||||
PowerState: "PowerOn",
|
||||
Flavor: Flavor{Name: "m4.medium"},
|
||||
},
|
||||
},
|
||||
mockStatusCode: 200,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,6 @@ const (
|
|||
AppInstFieldConfigsKind = "27.1"
|
||||
AppInstFieldConfigsConfig = "27.2"
|
||||
AppInstFieldHealthCheck = "29"
|
||||
AppInstFieldPowerState = "31"
|
||||
AppInstFieldExternalVolumeSize = "32"
|
||||
AppInstFieldAvailabilityZone = "33"
|
||||
AppInstFieldVmFlavor = "34"
|
||||
|
|
@ -201,7 +200,6 @@ type App struct {
|
|||
GlobalID string `json:"global_id,omitempty"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
Fields []string `json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
// AppInstance represents a deployed application instance
|
||||
|
|
@ -216,8 +214,6 @@ type AppInstance struct {
|
|||
UniqueID string `json:"unique_id,omitempty"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
PowerState string `json:"power_state,omitempty"`
|
||||
Fields []string `json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
// Cloudlet represents edge infrastructure
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ func runComprehensiveWorkflow(ctx context.Context, c *v2.Client, config Workflow
|
|||
fmt.Printf(" • Cloudlet: %s/%s\n", instanceDetails.Key.CloudletKey.Organization, instanceDetails.Key.CloudletKey.Name)
|
||||
fmt.Printf(" • Flavor: %s\n", instanceDetails.Flavor.Name)
|
||||
fmt.Printf(" • State: %s\n", instanceDetails.State)
|
||||
fmt.Printf(" • Power State: %s\n", instanceDetails.PowerState)
|
||||
|
||||
// 6. List Application Instances
|
||||
fmt.Println("\n6️⃣ Listing application instances...")
|
||||
|
|
@ -328,11 +327,7 @@ func waitForInstanceReady(ctx context.Context, c *v2.Client, instanceKey v2.AppI
|
|||
continue
|
||||
}
|
||||
|
||||
fmt.Printf(" 📊 Instance state: %s", instance.State)
|
||||
if instance.PowerState != "" {
|
||||
fmt.Printf(" (power: %s)", instance.PowerState)
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf(" 📊 Instance state: %s\n", instance.State)
|
||||
|
||||
// Check if instance is ready (not in creating state)
|
||||
state := strings.ToLower(instance.State)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue