diff --git a/pkg/models/model.go b/pkg/models/model.go index c28448d..0d1d30b 100644 --- a/pkg/models/model.go +++ b/pkg/models/model.go @@ -26,18 +26,18 @@ import ( ) type Model struct { - Switches []Switch `yaml:"switches"` - CapacityBlocks []CapacityBlock `yaml:"capacity_blocks"` - PhysicalLayers []PhysicalLayers `yaml:"physical_layers"` + Switches []*Switch `yaml:"switches"` + CapacityBlocks []*CapacityBlock `yaml:"capacity_blocks"` - // defived + // derived Nodes map[string]*Node } type Switch struct { - Name string `yaml:"name"` - Switches []string `yaml:"switches"` - CapacityBlocks []string `yaml:"capacity_blocks"` + Name string `yaml:"name"` + Metadata map[string]string `yaml:"metadata"` + Switches []string `yaml:"switches"` + CapacityBlocks []string `yaml:"capacity_blocks"` } type CapacityBlock struct { @@ -47,21 +47,9 @@ type CapacityBlock struct { Nodes []string `yaml:"nodes"` } -type PhysicalLayers struct { - Name string `yaml:"name"` - Type string `yaml:"type"` - SubLayers []string `yaml:"sub_layers"` - CapacityBlocks []string `yaml:"capacity_blocks"` -} - -const ( - PhysicalLayerRegion = "region" - PhysicalLayerAZ = "availability_zone" - PhysicalLayerPG = "placement_group" -) - type Node struct { Name string + Metadata map[string]string Type string NVLink string NetLayers []string @@ -83,45 +71,44 @@ func NewModelFromFile(fname string) (*Model, error) { return nil, err } - if err = validateLayers(model.PhysicalLayers); err != nil { - return nil, err - } - return model, err } func (m *Model) setNodeMap() error { // switch map child:parent - swmap := make(map[string]string) + swmap := make(map[string]*Switch) // capacity block map cb:switch - cbmap := make(map[string]string) + cbmap := make(map[string]*Switch) + for _, parent := range m.Switches { for _, sw := range parent.Switches { if p, ok := swmap[sw]; ok { // a child switch cannot have more than one parent switch return fmt.Errorf("switch %q has two parent switches %q and %q", sw, parent.Name, p) } - swmap[sw] = parent.Name + swmap[sw] = parent } for _, cb := range parent.CapacityBlocks { if p, ok := cbmap[cb]; ok { // a capacity block cannot have more than one switch return fmt.Errorf("capacity block %q has two switches %q and %q", cb, parent.Name, p) } - cbmap[cb] = parent.Name + cbmap[cb] = parent } } m.Nodes = make(map[string]*Node) for _, cb := range m.CapacityBlocks { var netLayers []string + var metadata map[string]string + var err error + sw, ok := cbmap[cb.Name] if ok { - net, err := getNetworkLayers(sw, swmap) + netLayers, metadata, err = getNetworkLayers(sw, swmap) if err != nil { return err } - netLayers = net } for _, name := range cb.Nodes { @@ -130,6 +117,7 @@ func (m *Model) setNodeMap() error { } m.Nodes[name] = &Node{ Name: name, + Metadata: metadata, Type: cb.Type, NVLink: cb.NVLink, NetLayers: netLayers, @@ -141,80 +129,28 @@ func (m *Model) setNodeMap() error { return nil } -func getNetworkLayers(name string, swmap map[string]string) ([]string, error) { - sw := make(map[string]bool) - res := []string{} +func getNetworkLayers(sw *Switch, swmap map[string]*Switch) ([]string, map[string]string, error) { + visited := make(map[string]bool) + layers := []string{} + metadata := make(map[string]string) + for { + name := sw.Name // check for circular switch topology - if _, ok := sw[name]; ok { - return nil, fmt.Errorf("circular topology for switch %q", name) + if _, ok := visited[name]; ok { + return nil, nil, fmt.Errorf("circular topology for switch %q", name) + } + visited[name] = true + layers = append(layers, name) + for k, v := range sw.Metadata { + metadata[k] = v } - sw[name] = true - res = append(res, name) - parent, ok := swmap[name] if !ok { - return res, nil - } - name = parent - } -} - -// Check to make sure each layer is unique and has only a single parent, if any, and enumerates them into a map of layer name to parent index within the layers list -// If the layer has no entry within the map, it means that the layer has no parent -func getLayerParentMap(layers []PhysicalLayers) (map[string]int, error) { - parentMap := make(map[string]int) - for i, layer := range layers { - layerName := layer.Name - var parentCount int = 0 - for j, checkLayer := range layers { - if i == j { - continue - } - if layerName == checkLayer.Name { - return nil, fmt.Errorf("duplicated physical layer name %q", layerName) - } - for _, subLayerName := range checkLayer.SubLayers { - if layerName == subLayerName { - parentMap[layerName] = j - parentCount++ - break - } - } - } - if parentCount > 1 { - return nil, fmt.Errorf("physical layer with name %q has more than one parent (%d parents)", layerName, parentCount) - } - } - return parentMap, nil -} - -func validateLayers(layers []PhysicalLayers) error { - // Validates the parent structure of the layers and gets the map of nodes to parents - parentMap, err := getLayerParentMap(layers) - if err != nil { - return err - } - - // Check to make sure there are no loops among the physical layers - for _, layer := range layers { - layerName := layer.Name - currLayerIdx, ok := parentMap[layerName] - if ok { - currLayerName := layers[currLayerIdx].Name - for { - currLayerIdx, ok = parentMap[currLayerName] - if !ok { - break - } - currLayerName = layers[currLayerIdx].Name - if currLayerName == layerName { - return fmt.Errorf("circular layer dependencies involving layer with name %q", layerName) - } - } + return layers, metadata, nil } + sw = parent } - return nil } func (model *Model) ToGraph() (*topology.Vertex, map[string]string) { @@ -287,42 +223,3 @@ func (model *Model) ToGraph() (*topology.Vertex, map[string]string) { treeRoot.Metadata = map[string]string{topology.KeyPlugin: topology.TopologyTree} return treeRoot, instance2node } - -// Get a map that maps from the name of each node in the model to the cloestest physical layer that shares the given type. -// If no entry exists for the node in the returned map, then there is no layer the node exists in with the given type -func (model *Model) NodeToLayerMap(layerType string) (map[string]string, error) { - // Maps each capacity block to a parent physical layer index - cbToLayer := make(map[string]int) - for idx, layer := range model.PhysicalLayers { - for _, cbName := range layer.CapacityBlocks { - cbToLayer[cbName] = idx - } - } - - // Goes through each node, gets the capacity block, and walks up the parent tree to find the cloest layer of the given type - nodeToLayer := make(map[string]string) - layerParentMap, err := getLayerParentMap(model.PhysicalLayers) - if err != nil { - return nil, err - } - for _, node := range model.Nodes { - cb := node.CapacityBlock - layerIdx, ok := cbToLayer[cb] - if !ok { - return nil, fmt.Errorf("capacity block %q not found in any physical layer", cb) - } - for { - layer := model.PhysicalLayers[layerIdx] - if layer.Type == layerType { - nodeToLayer[node.Name] = layer.Name - break - } - layerIdx, ok = layerParentMap[layer.Name] - if !ok { - break - } - } - } - - return nodeToLayer, nil -} diff --git a/pkg/models/model_test.go b/pkg/models/model_test.go index 4e2915c..476ae76 100644 --- a/pkg/models/model_test.go +++ b/pkg/models/model_test.go @@ -23,156 +23,167 @@ import ( ) func TestNewModelFromFile(t *testing.T) { - cfg, err := NewModelFromFile("../../tests/models/medium-tree.yaml") + cfg, err := NewModelFromFile("../../tests/models/medium.yaml") require.NoError(t, err) expected := &Model{ - Switches: []Switch{ + Switches: []*Switch{ { Name: "sw3", + Metadata: map[string]string{"region": "us-west"}, Switches: []string{"sw21", "sw22"}, }, { Name: "sw21", + Metadata: map[string]string{"availability_zone": "zone1"}, Switches: []string{"sw11", "sw12"}, }, { Name: "sw22", + Metadata: map[string]string{"availability_zone": "zone2"}, Switches: []string{"sw13", "sw14"}, }, { Name: "sw11", + Metadata: map[string]string{"group": "cb11"}, CapacityBlocks: []string{"cb11"}, }, { Name: "sw12", + Metadata: map[string]string{"group": "cb12"}, CapacityBlocks: []string{"cb12"}, }, { Name: "sw13", + Metadata: map[string]string{"group": "cb13"}, CapacityBlocks: []string{"cb13"}, }, { Name: "sw14", + Metadata: map[string]string{"group": "cb14"}, CapacityBlocks: []string{"cb14"}, }, }, - CapacityBlocks: []CapacityBlock{ - { - Name: "cb10", - Type: "H100", - NVLink: "nv1", - Nodes: []string{"n10-1", "n10-2"}, - }, + CapacityBlocks: []*CapacityBlock{ { Name: "cb11", - Type: "H100", - NVLink: "nv1", + Type: "GB200", + NVLink: "nvl1", Nodes: []string{"n11-1", "n11-2"}, }, { - Name: "cb12", - Type: "H100", - Nodes: []string{"n12-1", "n12-2"}, - }, - { - Name: "cb13", - Type: "H100", - Nodes: []string{"n13-1", "n13-2"}, - }, - { - Name: "cb14", - Type: "H100", - Nodes: []string{"n14-1", "n14-2"}, - }, - }, - PhysicalLayers: []PhysicalLayers{ - { - Name: "R1", - Type: "region", - SubLayers: []string{"AZ1", "AZ2"}, - }, - { - Name: "AZ1", - Type: "availability_zone", - SubLayers: []string{"G1"}, + Name: "cb12", + Type: "GB200", + NVLink: "nvl2", + Nodes: []string{"n12-1", "n12-2"}, }, { - Name: "AZ2", - Type: "availability_zone", - SubLayers: []string{"G2"}, + Name: "cb13", + Type: "GB200", + NVLink: "nvl3", + Nodes: []string{"n13-1", "n13-2"}, }, { - Name: "G1", - Type: "placement_group", - CapacityBlocks: []string{"cb10", "cb11", "cb12"}, - }, - { - Name: "G2", - Type: "placement_group", - CapacityBlocks: []string{"cb13", "cb14"}, + Name: "cb14", + Type: "GB200", + NVLink: "nvl4", + Nodes: []string{"n14-1", "n14-2"}, }, }, Nodes: map[string]*Node{ - "n10-1": { - Name: "n10-1", - Type: "H100", - NVLink: "nv1", - CapacityBlock: "cb10", - }, - "n10-2": { - Name: "n10-2", - Type: "H100", - NVLink: "nv1", - CapacityBlock: "cb10", - }, "n11-1": { - Name: "n11-1", - Type: "H100", - NVLink: "nv1", + Name: "n11-1", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone1", + "group": "cb11", + }, + Type: "GB200", + NVLink: "nvl1", NetLayers: []string{"sw11", "sw21", "sw3"}, CapacityBlock: "cb11", }, "n11-2": { - Name: "n11-2", - Type: "H100", - NVLink: "nv1", + Name: "n11-2", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone1", + "group": "cb11", + }, + Type: "GB200", + NVLink: "nvl1", NetLayers: []string{"sw11", "sw21", "sw3"}, CapacityBlock: "cb11", }, "n12-1": { - Name: "n12-1", - Type: "H100", + Name: "n12-1", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone1", + "group": "cb12", + }, + Type: "GB200", + NVLink: "nvl2", NetLayers: []string{"sw12", "sw21", "sw3"}, CapacityBlock: "cb12", }, "n12-2": { - Name: "n12-2", - Type: "H100", + Name: "n12-2", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone1", + "group": "cb12", + }, + Type: "GB200", + NVLink: "nvl2", NetLayers: []string{"sw12", "sw21", "sw3"}, CapacityBlock: "cb12", }, "n13-1": { - Name: "n13-1", - Type: "H100", + Name: "n13-1", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone2", + "group": "cb13", + }, + Type: "GB200", + NVLink: "nvl3", NetLayers: []string{"sw13", "sw22", "sw3"}, CapacityBlock: "cb13", }, "n13-2": { - Name: "n13-2", - Type: "H100", + Name: "n13-2", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone2", + "group": "cb13", + }, + Type: "GB200", + NVLink: "nvl3", NetLayers: []string{"sw13", "sw22", "sw3"}, CapacityBlock: "cb13", }, "n14-1": { - Name: "n14-1", - Type: "H100", + Name: "n14-1", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone2", + "group": "cb14", + }, + Type: "GB200", + NVLink: "nvl4", NetLayers: []string{"sw14", "sw22", "sw3"}, CapacityBlock: "cb14", }, "n14-2": { - Name: "n14-2", - Type: "H100", + Name: "n14-2", + Metadata: map[string]string{ + "region": "us-west", + "availability_zone": "zone2", + "group": "cb14", + }, + Type: "GB200", + NVLink: "nvl4", NetLayers: []string{"sw14", "sw22", "sw3"}, CapacityBlock: "cb14", }, diff --git a/pkg/providers/aws/provider_sim.go b/pkg/providers/aws/provider_sim.go index 7a0e9a2..b3676fc 100644 --- a/pkg/providers/aws/provider_sim.go +++ b/pkg/providers/aws/provider_sim.go @@ -26,17 +26,18 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ec2" "github.com/aws/aws-sdk-go-v2/service/ec2/types" - int_config "github.com/NVIDIA/topograph/internal/config" "github.com/NVIDIA/topograph/pkg/models" "github.com/NVIDIA/topograph/pkg/providers" ) -const NAME_SIM = "aws-sim" -const DEFAULT_MAX_RESULTS = 20 +const ( + NAME_SIM = "aws-sim" -type SimParams struct { - ModelPath string `mapstructure:"model_path"` -} + AvailabilityZoneKey = "availability_zone" + GroupNameKey = "group" + + DEFAULT_MAX_RESULTS = 20 +) type SimClient struct { Model *models.Model @@ -44,23 +45,11 @@ type SimClient struct { NextTokens map[string]string } -var simulationClient *Client = nil - func (client SimClient) DescribeInstanceTopology(ctx context.Context, params *ec2.DescribeInstanceTopologyInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTopologyOutput, error) { // If we need to calculate new results (a previous token was not given) givenToken := params.NextToken if givenToken == nil { - // Gets availability zone and placement group for each instance - instanceAzs, err := client.Model.NodeToLayerMap(models.PhysicalLayerAZ) - if err != nil { - return nil, err - } - instancePgs, err := client.Model.NodeToLayerMap(models.PhysicalLayerPG) - if err != nil { - return nil, err - } - // Refreshes the clients internal storage for outputs client.Outputs = make(map[string](*[]types.InstanceTopology)) client.NextTokens = make(map[string]string) @@ -86,12 +75,15 @@ func (client SimClient) DescribeInstanceTopology(ctx context.Context, params *ec // Gets the availability zone and placement group of the instance node := client.Model.Nodes[instanceId] - az, ok := instanceAzs[instanceId] - if !ok { + var az, pg string + if len(node.Metadata) != 0 { + az = node.Metadata[AvailabilityZoneKey] + pg = node.Metadata[GroupNameKey] + } + if len(az) == 0 { return nil, fmt.Errorf("availability zone not found for instance %q in aws simulation", instanceId) } - pg, ok := instancePgs[instanceId] - if !ok { + if len(pg) == 0 { return nil, fmt.Errorf("placement group not found for instance %q in aws simulation", instanceId) } @@ -151,29 +143,23 @@ func LoaderSim(ctx context.Context, cfg providers.Config) (providers.Provider, e imdsClient := imds.NewFromConfig(defaultCfg) - var p SimParams - if err := int_config.Decode(cfg.Params, &p); err != nil { - return nil, fmt.Errorf("error decoding params: %w", err) - } - if len(p.ModelPath) == 0 { - return nil, fmt.Errorf("no model path for AWS simulation") + p, err := providers.GetSimParams(cfg.Params) + if err != nil { + return nil, err } - // Initializes the singleton, simulation client to be used, if not already done - if simulationClient == nil { - csp_model, err := models.NewModelFromFile(p.ModelPath) - if err != nil { - return nil, fmt.Errorf("unable to load model file for AWS simulation, %v", err) - } - simClient := SimClient{Model: csp_model} + csp_model, err := models.NewModelFromFile(p.ModelPath) + if err != nil { + return nil, fmt.Errorf("unable to load model file for AWS simulation, %v", err) + } + simClient := SimClient{Model: csp_model} - simulationClient = &Client{ - EC2: simClient, - } + client := &Client{ + EC2: simClient, } clientFactory := func(region string) (*Client, error) { - return simulationClient, nil + return client, nil } return New(clientFactory, imdsClient), nil diff --git a/pkg/providers/providers_sim.go b/pkg/providers/providers_sim.go new file mode 100644 index 0000000..a8dc34d --- /dev/null +++ b/pkg/providers/providers_sim.go @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package providers + +import ( + "fmt" + + "github.com/NVIDIA/topograph/internal/config" +) + +type SimParams struct { + ModelPath string `mapstructure:"model_path"` +} + +func GetSimParams(params map[string]any) (*SimParams, error) { + var p SimParams + if err := config.Decode(params, &p); err != nil { + return nil, fmt.Errorf("error decoding params: %w", err) + } + if len(p.ModelPath) == 0 { + return nil, fmt.Errorf("no model path for AWS simulation") + } + + return &p, nil +} diff --git a/tests/models/medium-block.yaml b/tests/models/medium-block.yaml deleted file mode 100644 index 5c1793a..0000000 --- a/tests/models/medium-block.yaml +++ /dev/null @@ -1,25 +0,0 @@ -switches: -- name: spine1 - switches: [ibleaf1,ibleaf2] -- name: ibleaf1 - capacity_blocks: [cb1,cb2] -- name: ibleaf2 - capacity_blocks: [cb3,cb4] -capacity_blocks: -- name: cb1 - nvlink: nv1 - type: H100 - nodes: [n1-1,n1-2,n1-3,n1-4] -- name: cb2 - nvlink: nv2 - type: H100 - nodes: [n2-1,n2-2,n2-3,n2-4] -- name: cb3 - nvlink: nv3 - type: H100 - nodes: [n3-1,n3-2,n3-3,n3-4] -- name: cb4 - nvlink: nv4 - type: H100 - nodes: [n4-1,n4-2,n4-3,n4-4] -physical_layers: [] \ No newline at end of file diff --git a/tests/models/medium-tree.yaml b/tests/models/medium-tree.yaml deleted file mode 100644 index 689fbb3..0000000 --- a/tests/models/medium-tree.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# ______ sw3 _____ -# / \ -# sw21 sw22 -# / \ / \ -# sw11 sw12 sw13 sw14 -# ________ | | | | -# | nvlink | | | | | -# ------- ------- ------- ------- ------- -# | n10-1 | | n11-1 | | n12-1 | | n13-1 | | n14-1 | -# | n10-2 | | n11-2 | | n12-2 | | n13-2 | | n14-2 | -# ------- ------- ------- ------- ------- -# cb10 cb11 cb12 cb13 cb14 -# -# Physical Layers: -# -# R1 -# / \ -# / \ -# AZ1 AZ2 -# | | -# G1 G2 -# | | -# cb10, cb13 -# cb11, cb14 -# cb12 -# -switches: -- name: sw3 - switches: [sw21,sw22] -- name: sw21 - switches: [sw11,sw12] -- name: sw22 - switches: [sw13,sw14] -- name: sw11 - capacity_blocks: [cb11] -- name: sw12 - capacity_blocks: [cb12] -- name: sw13 - capacity_blocks: [cb13] -- name: sw14 - capacity_blocks: [cb14] -capacity_blocks: -- name: cb10 - nvlink: nv1 - type: H100 - nodes: [n10-1,n10-2] -- name: cb11 - nvlink: nv1 - type: H100 - nodes: [n11-1,n11-2] -- name: cb12 - type: H100 - nodes: [n12-1,n12-2] -- name: cb13 - type: H100 - nodes: [n13-1,n13-2] -- name: cb14 - type: H100 - nodes: [n14-1,n14-2] -physical_layers: -- name: R1 - type: region - sub_layers: [AZ1, AZ2] -- name: AZ1 - type: availability_zone - sub_layers: [G1] -- name: AZ2 - type: availability_zone - sub_layers: [G2] -- name: G1 - type: placement_group - capacity_blocks: [cb10, cb11, cb12] -- name: G2 - type: placement_group - capacity_blocks: [cb13, cb14] diff --git a/tests/models/medium.yaml b/tests/models/medium.yaml new file mode 100644 index 0000000..be73ac8 --- /dev/null +++ b/tests/models/medium.yaml @@ -0,0 +1,69 @@ +# ______ sw3 _____ +# / \ +# sw21 sw22 +# / \ / \ +# sw11 sw12 sw13 sw14 +# | | | | +# | | | | +# ------- ------- ------- ------- +# | n11-1 | | n12-1 | | n13-1 | | n14-1 | +# | n11-2 | | n12-2 | | n13-2 | | n14-2 | +# ------- ------- ------- ------- +# cb11 cb12 cb13 cb14 +# +# Metadata: +# sw3: region:us-west +# sw21: availability_zone:zone1 +# sw22: availability_zone:zone2 +# sw11: group:cb11 +# sw12: group:cb12 +# sw13: group:cb13 +# sw14: group:cb14 +# + +switches: +- name: sw3 + metadata: + region: us-west + switches: [sw21,sw22] +- name: sw21 + metadata: + availability_zone: zone1 + switches: [sw11,sw12] +- name: sw22 + metadata: + availability_zone: zone2 + switches: [sw13,sw14] +- name: sw11 + metadata: + group: cb11 + capacity_blocks: [cb11] +- name: sw12 + metadata: + group: cb12 + capacity_blocks: [cb12] +- name: sw13 + metadata: + group: cb13 + capacity_blocks: [cb13] +- name: sw14 + metadata: + group: cb14 + capacity_blocks: [cb14] +capacity_blocks: +- name: cb11 + type: GB200 + nvlink: nvl1 + nodes: [n11-1,n11-2] +- name: cb12 + type: GB200 + nvlink: nvl2 + nodes: [n12-1,n12-2] +- name: cb13 + type: GB200 + nvlink: nvl3 + nodes: [n13-1,n13-2] +- name: cb14 + type: GB200 + nvlink: nvl4 + nodes: [n14-1,n14-2] diff --git a/tests/models/small-tree.yaml b/tests/models/small-tree.yaml index 4fffa6d..ed3208d 100644 --- a/tests/models/small-tree.yaml +++ b/tests/models/small-tree.yaml @@ -26,4 +26,3 @@ capacity_blocks: - name: CB3 type: H100 nodes: [I34,I35,I36] -physical_layers: [] diff --git a/tests/payloads/test-aws-sim-block.json b/tests/payloads/test-aws-sim-block.json new file mode 100644 index 0000000..2958169 --- /dev/null +++ b/tests/payloads/test-aws-sim-block.json @@ -0,0 +1,30 @@ +{ + "provider": { + "name": "aws-sim", + "params": { + "model_path": "tests/models/medium.yaml" + } + }, + "engine": { + "name": "test", + "params": { + "plugin": "topology/block", + "block_sizes": "2,4" + } + }, + "nodes": [ + { + "region": "R1", + "instances": { + "n11-1": "n11-1", + "n11-2": "n11-2", + "n12-1": "n12-1", + "n12-2": "n12-2", + "n13-1": "n13-1", + "n13-2": "n13-2", + "n14-1": "n14-1", + "n14-2": "n14-2" + } + } + ] +} diff --git a/tests/payloads/test-aws-sim-tree.json b/tests/payloads/test-aws-sim-tree.json new file mode 100644 index 0000000..41be999 --- /dev/null +++ b/tests/payloads/test-aws-sim-tree.json @@ -0,0 +1,26 @@ +{ + "provider": { + "name": "aws-sim", + "params": { + "model_path": "tests/models/medium.yaml" + } + }, + "engine": { + "name": "test" + }, + "nodes": [ + { + "region": "R1", + "instances": { + "n11-1": "n11-1", + "n11-2": "n11-2", + "n12-1": "n12-1", + "n12-2": "n12-2", + "n13-1": "n13-1", + "n13-2": "n13-2", + "n14-1": "n14-1", + "n14-2": "n14-2" + } + } + ] +} diff --git a/tests/payloads/test-aws-sim.json b/tests/payloads/test-aws-sim.json deleted file mode 100644 index 6fa3a34..0000000 --- a/tests/payloads/test-aws-sim.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "provider": - { - "name": "aws-sim", - "params": - { - "model_path": "tests/models/medium-tree.yaml" - } - }, - "engine": - { - "name": "test" - }, - "nodes": - [ - { - "region": "R1", - "instances": - { - "n11-1": "n11-1", - "n11-2": "n11-2", - "n12-1": "n12-1", - "n12-2": "n12-2", - "n13-1": "n13-1", - "n13-2": "n13-2", - "n14-1": "n14-1", - "n14-2": "n14-2" - } - } - ] -} \ No newline at end of file diff --git a/tests/payloads/test-toposim-block.json b/tests/payloads/test-toposim-block.json index d1f5f18..5e54d05 100644 --- a/tests/payloads/test-toposim-block.json +++ b/tests/payloads/test-toposim-block.json @@ -4,7 +4,7 @@ "name": "test", "params": { - "model_path": "tests/models/medium-block.yaml" + "model_path": "tests/models/medium.yaml" } }, "engine": @@ -16,4 +16,4 @@ "block_sizes": "2,4" } } -} \ No newline at end of file +} diff --git a/tests/payloads/test-toposim-tree.json b/tests/payloads/test-toposim-tree.json index ac680ac..ce7ecf5 100644 --- a/tests/payloads/test-toposim-tree.json +++ b/tests/payloads/test-toposim-tree.json @@ -4,11 +4,11 @@ "name": "test", "params": { - "model_path": "tests/models/medium-tree.yaml" + "model_path": "tests/models/medium.yaml" } }, "engine": { "name": "test" } -} \ No newline at end of file +}