testing

package
v0.0.0-...-8ff1004 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFakeInstancer = FakeInstancer{
		Instance: response.Instance{
			Domain: "compute-a432100.oraclecloud.internal.",
			Placement_requirements: []string{
				"/system/compute/placement/default",
				"/system/compute/allow_instances",
			},
			Ip:                     "10.31.5.106",
			Fingerprint:            "",
			Site:                   "",
			Last_state_change_time: interface{}(nil),
			Error_exception:        interface{}(nil),
			Cluster:                interface{}(nil),
			Shape:                  "oc5",
			Start_requested:        false,
			Vethernets:             interface{}(nil),
			Imagelist:              "",
			Image_format:           "raw",
			Cluster_uri:            interface{}(nil),
			Relationships:          []string{},
			Target_node:            interface{}(nil),
			Availability_domain:    "/uscom-central-1a",
			Networking: common.Networking{
				"eth0": common.Nic{
					Dns: []string{
						"ea63b8.compute-a432100.oraclecloud.internal.",
					},
					Model: "",
					Nat:   "ippool:/oracle/public/ippool",
					Seclists: []string{
						"/Compute-a432100/default/default",
					},
					Vethernet: "/oracle/public/default",
					Vnic:      "",
					Ipnetwork: "",
				},
			},
			Seclist_associations: interface{}(nil),
			Hostname:             "ea63b8.compute-a432100.oraclecloud.internal.",
			State:                "running",
			Disk_attach:          "",
			Label:                "tools",
			Priority:             "/oracle/public/default",
			Platform:             "linux",
			Quota_reservation:    interface{}(nil),
			Suspend_file:         interface{}(nil),
			Node:                 interface{}(nil),
			Resource_requirements: response.ResourceRequirments{
				Compressed_size:   0x0,
				Is_root_ssd:       false,
				Ram:               0x0,
				Cpus:              0,
				Root_disk_size:    0x0,
				Io:                0x0,
				Decompressed_size: 0x0,
				Gpus:              0x0,
				Ssd_data_size:     0x0,
			},
			Virtio:        interface{}(nil),
			Vnc:           "10.31.5.105:5900",
			Desired_state: "running",
			Storage_attachments: []response.Storage{
				{
					Index:               0x1,
					Storage_volume_name: "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
					Name:                "/Compute-a432100/sgiulitti@cloudbase.com/0/1f90e657-f852-45ad-afbf-9a94f640a7ae",
				},
			},
			Start_time: "2017-03-11T11:07:14Z", Storage_attachment_associations: []interface{}(nil),
			Quota: "/Compute-a432100", Vnc_key: interface{}(nil),
			Numerical_priority: 0x0,
			Suspend_requested:  false,
			Entry:              0,
			Error_reason:       "",
			Nat_associations:   interface{}(nil),
			SSHKeys: []string{
				"/Compute-a432100/sgiulitti@cloudbase.com/sgiulitti",
			},
			Tags: []string{
				"vm-dev",
				"juju-tools",
				"toolsdir",
				"/Compute-a432100/sgiulitti@cloudbase.com/0",
				"16a4e037dd2068fe691aed9ed0c40460",
			},
			Resolvers: interface{}(nil),
			Metrics:   interface{}(nil),
			Account:   "/Compute-a432100/default",
			Node_uuid: interface{}(nil),
			Name:      "/Compute-a432100/sgiulitti@cloudbase.com/0/ebc4ce91-56bb-4120-ba78-13762597f837",
			Vcable_id: "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6",
			Higgs:     interface{}(nil),
			Hypervisor: response.Hypervisor{
				Mode: "hvm",
			},
			Uri:              "https://compute.uscom-central-1.oraclecloud.com/instance/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837",
			Console:          interface{}(nil),
			Reverse_dns:      true,
			Launch_context:   "",
			Delete_requested: interface{}(nil),
			Tracking_id:      interface{}(nil),
			Hypervisor_type:  interface{}(nil),
			Attributes: response.Attributes{
				Dns: map[string]string{
					"domain":              "compute-a432100.oraclecloud.internal.",
					"hostname":            "ea63b8.compute-a432100.oraclecloud.internal.",
					"nimbula_vcable-eth0": "ea63b8.compute-a432100.oraclecloud.internal.",
				},
				Network: map[string]response.Network{
					"nimbula_vcable-eth0": {
						Address: []string{
							"c6:b0:fd:f1:ef:ac",
							"10.31.5.106",
						},
						Dhcp_options:   []string{},
						Id:             "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6",
						Model:          "",
						Vethernet:      "/oracle/public/default",
						Vethernet_id:   "0",
						Vethernet_type: "vlan",
						Instance:       "",
						Ipassociations: []string(nil),
						Ipattachment:   "",
						Ipnetwork:      "",
						Vnic:           "",
						Vnicsets:       []string(nil),
					},
				},
				Nimbula_orchestration: "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_instance",
				Sshkeys: []string{
					"ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
				},
				Userdata: map[string]interface{}{}},
			Boot_order: []int{1},
			Last_seen:  interface{}(nil),
		},
	}

	DefaultEnvironAPI = &FakeEnvironAPI{
		FakeInstancer: DefaultFakeInstancer,
		FakeInstance: FakeInstance{
			Create: response.LaunchPlan{
				Relationships: nil,
				Instances: []response.Instance{
					DefaultFakeInstancer.Instance,
				},
			},
			CreateErr: nil,
			All: response.AllInstances{
				Result: []response.Instance{
					DefaultFakeInstancer.Instance,
				},
			},
			AllErr:    nil,
			DeleteErr: nil,
		},
		FakeAuthenticater: FakeAuthenticater{
			AuthenticateErr: nil,
		},
		FakeShaper: FakeShaper{
			All: response.AllShapes{
				Result: []response.Shape{
					{
						Nds_iops_limit: 0x0,
						Ram:            0xf000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x174876e8000,
						Gpus:           0x0,
						Cpus:           8,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/ocio3m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "ocio3m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x7800,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           4,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc2m",
						Root_disk_size: 0x0,
						Io:             0x190,
						Name:           "oc2m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0xf000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           8,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc3m",
						Root_disk_size: 0x0,
						Io:             0x258,
						Name:           "oc3m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c00,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           4,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc4",
						Root_disk_size: 0x0,
						Io:             0x190,
						Name:           "oc4",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0xf000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           16,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc6",
						Root_disk_size: 0x0,
						Io:             0x320,
						Name:           "oc6",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x5d21dba0000,
						Gpus:           0x0,
						Cpus:           32,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/ocio5m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "ocio5m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x7800,
						Is_root_ssd:    false,
						Ssd_data_size:  0xba43b74000,
						Gpus:           0x0,
						Cpus:           4,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/ocio2m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "ocio2m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x1e00,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           2,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc3",
						Root_disk_size: 0x0,
						Io:             0xc8,
						Name:           "oc3",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x7800,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           8,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc5",
						Root_disk_size: 0x0,
						Io:             0x258,
						Name:           "oc5",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x1e000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           32,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc7",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc7",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x2d000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           48,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc8",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc8",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x1e000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           16,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc4m",
						Root_disk_size: 0x0,
						Io:             0x320,
						Name:           "oc4m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           32,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc5m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc5m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c00,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           2,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc1m",
						Root_disk_size: 0x0,
						Io:             0xc8,
						Name:           "oc1m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x78000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           64,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc9m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc9m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x5a000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           48,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc8m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc8m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x0,
						Gpus:           0x0,
						Cpus:           64,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/oc9",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "oc9",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x3c00,
						Is_root_ssd:    false,
						Ssd_data_size:  0x5d21dba000,
						Gpus:           0x0,
						Cpus:           2,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/ocio1m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "ocio1m",
					},
					{
						Nds_iops_limit: 0x0,
						Ram:            0x1e000,
						Is_root_ssd:    false,
						Ssd_data_size:  0x2e90edd0000,
						Gpus:           0x0,
						Cpus:           16,
						Uri:            "https://compute.uscom-central-1.oraclecloud.com/shape/ocio4m",
						Root_disk_size: 0x0,
						Io:             0x3e8,
						Name:           "ocio4m",
					},
				},
			},
			AllErr: nil,
		},
		FakeImager: FakeImager{
			All: response.AllImageLists{
				Result: []response.ImageList{
					{
						Default:     1,
						Description: nil,
						Entries: []response.ImageListEntry{
							{
								Attributes: response.AttributesEntry{
									Userdata:        map[string]interface{}{"enable_rdp": "true"},
									MinimumDiskSize: "27",
									DefaultShape:    "oc4",
									SupportedShapes: "oc1m,oc2m,oc3,oc3m,oc4,oc4m,oc5,oc5m,oc6,oc7,ocio1m,ocio2m,ocio3m,ocio4m,ocio5m,ociog1k80,ociog2k80,ociog3k80"},
								Imagelist:     "",
								Version:       1,
								Machineimages: []string{"/Compute-a432100/sgiulitti@cloudbase.com/Microsoft_Windows_Server_2012_R2"},
								Uri:           "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Microsoft_Windows_Server_2012_R2/entry/1",
							},
						},
						Uri:  "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Microsoft_Windows_Server_2012_R2",
						Name: "/Compute-a432100/sgiulitti@cloudbase.com/Microsoft_Windows_Server_2012_R2",
					},
					{
						Default:     1,
						Description: nil,
						Entries: []response.ImageListEntry{
							{
								Attributes: response.AttributesEntry{
									Userdata:        map[string]interface{}{},
									MinimumDiskSize: "10",
									DefaultShape:    "oc2m",
									SupportedShapes: "oc3,oc4,oc5,oc6,oc7,oc1m,oc2m,oc3m,oc4m,oc5m",
								},
								Imagelist:     "",
								Version:       1,
								Machineimages: []string{"/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307"},
								Uri:           "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307/entry/1",
							},
						},
						Uri:  "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
						Name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
					},
					{
						Default:     1,
						Description: nil,
						Entries: []response.ImageListEntry{
							{
								Attributes: response.AttributesEntry{
									Userdata:        map[string]interface{}{},
									MinimumDiskSize: "10",
									DefaultShape:    "oc2m",
									SupportedShapes: "oc3,oc4,oc5,oc6,oc7,oc1m,oc2m,oc3m,oc4m,oc5m",
								},
								Imagelist: "",
								Version:   1,
								Machineimages: []string{
									"/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.14.04-LTS.amd64.20170307",
								},
								Uri: "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.14.04-LTS.amd64.20170307/entry/1",
							},
						},
						Uri:  "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.14.04-LTS.amd64.20170307",
						Name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.14.04-LTS.amd64.20170307",
					},
					{
						Default:     1,
						Description: nil,
						Entries: []response.ImageListEntry{
							{
								Attributes: response.AttributesEntry{
									Userdata:        map[string]interface{}{},
									MinimumDiskSize: "10",
									DefaultShape:    "oc2m",
									SupportedShapes: "oc3,oc4,oc5,oc6,oc7,oc1m,oc2m,oc3m,oc4m,oc5m",
								},
								Imagelist: "",
								Version:   1,
								Machineimages: []string{
									"/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.12.04-LTS.amd64.20170307",
								},
								Uri: "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.12.04-LTS.amd64.20170307/entry/1",
							},
						},
						Uri:  "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Ubuntu.12.04-LTS.amd64.20170307",
						Name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.12.04-LTS.amd64.20170307",
					},
					{
						Default:     1,
						Description: nil,
						Entries: []response.ImageListEntry{
							{
								Attributes: response.AttributesEntry{
									Userdata:        map[string]interface{}{"enable_rdp": "true"},
									MinimumDiskSize: "27",
									DefaultShape:    "oc4",
									SupportedShapes: "oc1m,oc2m,oc3,oc3m,oc4,oc4m,oc5,oc5m,oc6,oc7,ocio1m,ocio2m,ocio3m,ocio4m,ocio5m,ociog1k80,ociog2k80,ociog3k80",
								},
								Imagelist: "",
								Version:   1,
								Machineimages: []string{
									"/Compute-a432100/sgiulitti@cloudbase.com/Microsoft_Windows_Server_2008_R2",
								},
								Uri: "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Microsoft_Windows_Server_2008_R2/entry/1",
							},
						},
						Uri:  "https://compute.uscom-central-1.oraclecloud.com/imagelist/Compute-a432100/sgiulitti%40cloudbase.com/Microsoft_Windows_Server_2008_R2",
						Name: "/Compute-a432100/sgiulitti@cloudbase.com/Microsoft_Windows_Server_2008_R2",
					},
				},
			},
			AllErr: nil,
		},
		FakeIpReservation: FakeIpReservation{
			All: response.AllIpReservations{
				Result: []response.IpReservation{
					{
						Account:    "/Compute-a432100/default",
						Ip:         "129.150.66.1",
						Name:       "/Compute-a432100/sgiulitti@cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
						Parentpool: "/oracle/public/ippool",
						Permanent:  false,
						Quota:      nil,
						Tags:       []string{},
						Uri:        "https://compute.uscom-central-1.oraclecloud.com/ip/reservation/Compute-a432100/sgiulitti%40cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
						Used:       true,
					},
				},
			},
			Update: response.IpReservation{
				Account:    "/Compute-a432100/default",
				Ip:         "129.150.66.1",
				Name:       "/Compute-a432100/sgiulitti@cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
				Parentpool: "/oracle/public/ippool",
				Permanent:  false,
				Quota:      nil,
				Tags:       []string{},
				Uri:        "https://compute.uscom-central-1.oraclecloud.com/ip/reservation/Compute-a432100/sgiulitti%40cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
				Used:       true,
			},
			Create: response.IpReservation{
				Account:    "/Compute-a432100/default",
				Ip:         "129.150.66.1",
				Name:       "/Compute-a432100/sgiulitti@cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
				Parentpool: "/oracle/public/ippool",
				Permanent:  false,
				Quota:      nil,
				Tags:       []string{},
				Uri:        "https://compute.uscom-central-1.oraclecloud.com/ip/reservation/Compute-a432100/sgiulitti%40cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
				Used:       true,
			},
			UpdateErr: nil,
			CreateErr: nil,
			AllErr:    nil,
			DeleteErr: nil,
		},
		FakeIpAssociation: FakeIpAssociation{
			All: response.AllIpAssociations{
				Result: []response.IpAssociation{
					{
						Account:     "/Compute-a432100/default",
						Ip:          "129.150.66.1",
						Name:        "/Compute-a432100/sgiulitti@cloudbase.com/f490e701-c68f-415d-a166-b75f1e1116d4",
						Parentpool:  "ippool:/oracle/public/ippool",
						Reservation: "/Compute-a432100/sgiulitti@cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
						Uri:         "https://compute.uscom-central-1.oraclecloud.com/ip/association/Compute-a432100/sgiulitti%40cloudbase.com/f490e701-c68f-415d-a166-b75f1e1116d4",
						Vcable:      "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6",
					},
				},
			},
			AllErr: nil,
			Create: response.IpAssociation{
				Account:     "/Compute-a432100/default",
				Ip:          "129.150.66.1",
				Name:        "/Compute-a432100/sgiulitti@cloudbase.com/f490e701-c68f-415d-a166-b75f1e1116d4",
				Parentpool:  "ippool:/oracle/public/ippool",
				Reservation: "/Compute-a432100/sgiulitti@cloudbase.com/29286b89-8d91-45b7-8a3a-78fffa2109b9",
				Uri:         "https://compute.uscom-central-1.oraclecloud.com/ip/association/Compute-a432100/sgiulitti%40cloudbase.com/f490e701-c68f-415d-a166-b75f1e1116d4",
				Vcable:      "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6",
			},
			CreateErr: nil,
			DeleteErr: nil,
		},
		FakeIpNetworkExchanger: FakeIpNetworkExchanger{
			All: response.AllIpNetworkExchanges{
				Result: []response.IpNetworkExchange{
					{
						Description: nil,
						Name:        "/Compute-a432100/sgiulitti@cloudbase.com/dbsql",
						Tags:        []string{},
						Uri:         "https://compute.uscom-central-1.oraclecloud.com:443/network/v1/ipnetworkexchange/Compute-a432100/sgiulitti@cloudbase.com/dbsql",
					},
					{
						Description: nil,
						Name:        "/Compute-a432100/sgiulitti@cloudbase.com/test",
						Tags:        []string{},
						Uri:         "https://compute.uscom-central-1.oraclecloud.com:443/network/v1/ipnetworkexchange/Compute-a432100/sgiulitti@cloudbase.com/test",
					},
				},
			},
			AllErr: nil,
		},
		FakeIpNetworker: FakeIpNetworker{
			All: response.AllIpNetworks{
				Result: []response.IpNetwork{
					{
						Description:           nil,
						IpAddressPrefix:       "120.120.120.0/24",
						IpNetworkExchange:     nil,
						Name:                  "/Compute-a432100/sgiulitti@cloudbase.com/juju-charm-db",
						PublicNaptEnabledFlag: false,
						Tags:                  []string{},
						Uri:                   "https://compute.uscom-central-1.oraclecloud.com:443/network/v1/ipnetwork/Compute-a432100/sgiulitti@cloudbase.com/juju-charm-db",
					},
				},
			},
			AllErr: nil,
		},
		FakeVnicSet: FakeVnicSet{
			VnicSetErr: nil,
			CreateErr:  nil,
			DeleteErr:  nil,
		},
		FakeStorageAPI:  DefaultFakeStorageAPI,
		FakeRules:       DefaultFakeRules,
		FakeApplication: DefaultSecApplications,
		FakeSecIp:       DefaultSecIp,
		FakeSecList:     DefaultFakeSecList,
		FakeAssociation: DefaultFakeAssociation,
		FakeAcl:         DefaultFakeAcl,
		FakeSecRules:    DefaultFakeSecrules,
	}
)
View Source
var (
	DefaultFakeRules = FakeRules{
		All: response.AllSecRules{
			Result: []response.SecRule{
				{
					Action:      common.SecRulePermit,
					Application: "/Compute-acme/jack.jones@example.com/video_streaming_udp",
					Name:        "/Compute-acme/jack.jones@example.com/es_to_videoservers_stream",
					Dst_list:    "seclist:/Compute-acme/jack.jones@example.com/allowed_video_servers",
					Src_list:    "seciplist:/Compute-acme/jack.jones@example.com/es_iplist",
					Uri:         "https://api-z999.compute.us0.oraclecloud.com/secrule/Compute-acme/jack.jones@example.com/es_to_videoservers_stream",
					Src_is_ip:   "true",
					Dst_is_ip:   "false",
				},
			},
		},
		AllErr: nil,
	}

	DefaultSecApplications = FakeApplication{
		All: response.AllSecApplications{
			Result: []response.SecApplication{
				{
					Description: "Juju created security application",
					Dport:       "17070",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/Compute-a432100/sgiulitti@cloudbase.com/juju-72324bcb-e837-4542-8867-844282af22e3-7993630e-d13b-43a3-850e-a1778c7e394e",
					Protocol:    "tcp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/Compute-a432100/sgiulitti%40cloudbase.com/juju-72324bcb-e837-4542-8867-844282af22e3-7993630e-d13b-43a3-850e-a1778c7e394e",
					Value1:      17070,
					Value2:      -1,
					Id:          "1869cb17-5b12-49c5-a09a-046da8899bc9",
				},
				{
					Description: "Juju created security application",
					Dport:       "37017",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/Compute-a432100/sgiulitti@cloudbase.com/juju-72324bcb-e837-4542-8867-844282af22e3-ef8a7955-4315-47a2-83c1-8d2978ab77c7",
					Protocol:    "tcp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/Compute-a432100/sgiulitti%40cloudbase.com/juju-72324bcb-e837-4542-8867-844282af22e3-ef8a7955-4315-47a2-83c1-8d2978ab77c7",
					Value1:      37017,
					Value2:      -1,
					Id:          "cbefdac0-7684-4f81-a575-825c175aa7b4",
				},
			},
		},
		AllErr: nil,
		Default: response.AllSecApplications{
			Result: []response.SecApplication{
				{
					Description: "",
					Dport:       "",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/oracle/public/all",
					Protocol:    "all",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/all",
					Value1:      0,
					Value2:      0,
					Id:          "381c2267-1b38-4bbd-b53d-5149deddb094",
				},
				{
					Description: "",
					Dport:       "",
					Icmpcode:    "",
					Icmptype:    "echo",
					Name:        "/oracle/public/pings",
					Protocol:    "icmp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/pings",
					Value1:      8,
					Value2:      0,
					Id:          "57b0350b-2f02-4a2d-b5ec-cf731de36027",
				},
				{
					Description: "",
					Dport:       "",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/oracle/public/icmp",
					Protocol:    "icmp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/icmp",
					Value1:      255,
					Value2:      255,
					Id:          "abb27ccd-1872-48f9-86ef-38c72d6f8a38",
				},
				{
					Description: "",
					Dport:       "",
					Icmpcode:    "",
					Icmptype:    "reply",
					Name:        "/oracle/public/ping-reply",
					Protocol:    "icmp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/ping-reply",
					Value1:      0,
					Value2:      0,
					Id:          "3ad808d4-b740-42c1-805c-57feb7c96d40",
				},
				{
					Description: "",
					Dport:       "3306",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/oracle/public/mysql",
					Protocol:    "tcp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/mysql",
					Value1:      3306,
					Value2:      -1,
					Id:          "2fb5eaff-3127-4334-8b03-367a44bb83bd",
				},
				{
					Description: "",
					Dport:       "22",
					Icmpcode:    "",
					Icmptype:    "",
					Name:        "/oracle/public/ssh",
					Protocol:    "tcp",
					Uri:         "https://compute.uscom-central-1.oraclecloud.com/secapplication/oracle/public/ssh",
					Value1:      22, Value2: -1,
					Id: "5f027043-f6b3-4e1a-b9fa-a10d075744de",
				},
			},
		},
		DefaultErr: nil,
	}

	DefaultSecIp = FakeSecIp{
		All: response.AllSecIpLists{
			Result: []response.SecIpList{
				{
					Description: nil,
					Name:        "/oracle/public/site",
					Secipentries: []string{
						"10.60.32.128/26",
						"10.60.32.0/26",
						"10.60.37.0/26",
						"10.60.33.0/26",
						"10.60.36.128/26",
						"10.60.36.0/26",
					},
					Uri:      "https://compute.uscom-central-1.oraclecloud.com/seciplist/oracle/public/site",
					Group_id: "1003",
					Id:       "492ad26e-4c86-44bb-a439-535614d25f56",
				},
				{
					Description: nil,
					Name:        "/oracle/public/paas-infra",
					Secipentries: []string{
						"10.199.34.192/26",
						"160.34.15.48/29",
						"100.64.0.0/24",
					},
					Uri:      "https://compute.uscom-central-1.oraclecloud.com/seciplist/oracle/public/paas-infra",
					Group_id: "1006",
					Id:       "a671b8b6-2422-45ef-84fc-c65010f0c1a5",
				},
				{
					Description: nil,
					Name:        "/oracle/public/instance",
					Secipentries: []string{
						"10.31.0.0/19",
						"10.2.0.0/26",
						"10.16.0.0/19",
						"10.31.32.0/19",
						"10.16.64.0/19",
						"10.16.32.0/19",
						"10.16.128.0/19",
						"10.16.160.0/19",
						"10.16.192.0/19",
						"10.16.224.0/19",
						"10.28.192.0/19",
						"10.28.224.0/19",
					},
					Uri:      "https://compute.uscom-central-1.oraclecloud.com/seciplist/oracle/public/instance",
					Group_id: "1004",
					Id:       "5c3a5100-ced7-43f8-a5cd-10dce263db33",
				},
				{
					Description:  nil,
					Name:         "/oracle/public/public-internet",
					Secipentries: []string{"0.0.0.0/0"},
					Uri:          "https://compute.uscom-central-1.oraclecloud.com/seciplist/oracle/public/public-internet",
					Group_id:     "1002",
					Id:           "26fc6f14-4c3c-4059-a813-8a76ff141a0b",
				},
			},
		},
		AllErr: nil,
	}

	DefaultFakeSecList = FakeSecList{
		SecList: response.SecList{
			Account:              "/Compute-acme/default",
			Name:                 "/Compute-acme/jack.jones@example.com/allowed_video_servers",
			Uri:                  "https://api-z999.compute.us0.oraclecloud.com/seclist/Compute-acme/jack.jones@example.com/allowed_video_servers",
			Outbound_cidr_policy: "PERMIT",
			Policy:               common.SecRulePermit,
		},
		SecListErr: nil,
		Create: response.SecList{
			Account:              "/Compute-acme/default",
			Name:                 "/Compute-acme/jack.jones@example.com/allowed_video_servers",
			Uri:                  "https://api-z999.compute.us0.oraclecloud.com/seclist/Compute-acme/jack.jones@example.com/allowed_video_servers",
			Outbound_cidr_policy: "PERMIT",
			Policy:               common.SecRuleDeny,
		},
		CreateErr: nil,
	}

	DefaultFakeAssociation = FakeAssociation{
		All: response.AllSecAssociations{
			Result: []response.SecAssociation{
				{
					Name:    "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6/9e5c3f31-1769-46b6-bdc3-b8f3db0f0479",
					Seclist: "/Compute-a432100/default/default",
					Vcable:  "/Compute-a432100/sgiulitti@cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6",
					Uri:     "https://compute.uscom-central-1.oraclecloud.com/secassociation/Compute-a432100/sgiulitti%40cloudbase.com/faa46f2e-28c9-4500-b060-0997717540a6/9e5c3f31-1769-46b6-bdc3-b8f3db0f0479",
				},
			},
		},
		AllErr: nil,
	}

	DefaultFakeAcl = FakeAcl{
		Acl: response.Acl{
			Name:        "/Compute-a432100/gsamfira@cloudbase.com/juju-b3329a64-58f5-416c-85f7-e24de0beb979-0",
			Description: "ACL for machine 0",
			EnableFlag:  false,
			Tags:        []string{},
			Uri:         "https://compute.uscom-central-1.oraclecloud.com:443/network/v1/acl/Compute-a432100/gsamfira@cloudbase.com/juju-b3329a64-58f5-416c-85f7-e24de0beb979-0",
		},
		AclErr: nil,
		Create: response.Acl{
			Name:        "/Compute-a432100/gsamfira@cloudbase.com/juju-b3329a64-58f5-416c-85f7-e24de0beb979-0",
			Description: "ACL for machine 0",
			EnableFlag:  false,
			Tags:        []string{},
			Uri:         "https://compute.uscom-central-1.oraclecloud.com:443/network/v1/acl/Compute-a432100/gsamfira@cloudbase.com/juju-b3329a64-58f5-416c-85f7-e24de0beb979-0",
		},
	}

	DefaultFakeSecrules = FakeSecRules{
		All:    response.AllSecurityRules{},
		AllErr: nil,
		Create: response.SecurityRule{
			Name:                   "/Compute-acme/jack.jones@example.com/secrule1",
			Uri:                    "https://api-z999.compute.us0.oraclecloud.com:443/network/v1/secrule/Compute-acme/jack.jones@example.com/secrule1",
			Description:            "Sample security rule",
			Tags:                   nil,
			Acl:                    "/Compute-acme/jack.jones@example.com/acl1",
			FlowDirection:          common.Egress,
			SrcVnicSet:             "/Compute-acme/jack.jones@example.com/vnicset1",
			DstVnicSet:             "/Compute-acme/jack.jones@example.com/vnicset2",
			SrcIpAddressPrefixSets: []string{"/Compute-acme/jack.jones@example.com/ipaddressprefixset1"},
			DstIpAddressPrefixSets: nil,
			SecProtocols:           []string{"/Compute-acme/jack.jones@example.com/secprotocol1"},
			EnabledFlag:            true,
		},
	}

	DefaultFakeFirewallAPI = &FakeFirewallAPI{
		FakeComposer: FakeComposer{
			Compose: "/Compute-acme/jack.jones@example.com/allowed_video_servers",
		},
		FakeRules:       DefaultFakeRules,
		FakeApplication: DefaultSecApplications,
		FakeSecIp:       DefaultSecIp,
		FakeSecList:     DefaultFakeSecList,
		FakeAssociation: DefaultFakeAssociation,
		FakeAcl:         DefaultFakeAcl,
		FakeSecRules:    DefaultFakeSecrules,
	}
)
View Source
var (
	DefaultAllStorageVolumes = response.AllStorageVolumes{
		Result: []response.StorageVolume{
			{
				Account:           "/Compute-a432100/default",
				Bootable:          true,
				Description:       nil,
				Hypervisor:        nil,
				Imagelist:         "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Imagelist_entry:   1,
				Machineimage_name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Managed:           true,
				Name:              "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Platform:          "linux",
				Properties: []common.StoragePool{
					"/oracle/public/storage/default",
				},
				Quota:            nil,
				Readonly:         false,
				Shared:           false,
				Size:             10,
				Snapshot:         nil,
				Snapshot_account: "",
				Snapshot_id:      "",
				Status:           "Online",
				Status_detail:    "",
				Status_timestamp: "2017-04-06T14:23:54Z",
				Storage_pool:     "/uscom-central-1/chi1-opc-c10r310-zfs-1-v1/storagepool/iscsi",
				Tags:             []string{},
				Uri:              "https://compute.uscom-central-1.oraclecloud.com/storage/volume/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools_storage",
				Writecache:       false,
			},
		},
	}

	DefaultFakeStorageAPI = &FakeStorageAPI{
		FakeComposer: FakeComposer{
			Compose: "/Compute-acme/jack.jones@example.com/allowed_video_servers",
		},
		FakeStorageVolume: FakeStorageVolume{
			All:    DefaultAllStorageVolumes,
			AllErr: nil,
			StorageVolume: response.StorageVolume{
				Account:           "/Compute-a432100/default",
				Bootable:          true,
				Description:       nil,
				Hypervisor:        nil,
				Imagelist:         "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Imagelist_entry:   1,
				Machineimage_name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Managed:           true,
				Name:              "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Platform:          "linux",
				Properties: []common.StoragePool{
					"/oracle/public/storage/default",
				},
				Quota:            nil,
				Readonly:         false,
				Shared:           false,
				Size:             10485760,
				Snapshot:         nil,
				Snapshot_account: "",
				Snapshot_id:      "",
				Status:           "Online",
				Status_detail:    "",
				Status_timestamp: "2017-04-06T14:23:54Z",
				Storage_pool:     "/uscom-central-1/chi1-opc-c10r310-zfs-1-v1/storagepool/iscsi",
				Tags:             []string{},
				Uri:              "https://compute.uscom-central-1.oraclecloud.com/storage/volume/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools_storage",
				Writecache:       false,
			},
			StorageVolumeErr: nil,
			DeleteErr:        nil,
			Create: response.StorageVolume{
				Account:           "/Compute-a432100/default",
				Bootable:          true,
				Description:       nil,
				Hypervisor:        nil,
				Imagelist:         "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Imagelist_entry:   1,
				Machineimage_name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Managed:           true,
				Name:              "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Platform:          "linux",
				Properties: []common.StoragePool{
					"/oracle/public/storage/default",
				},
				Quota:            nil,
				Readonly:         false,
				Shared:           false,
				Size:             10,
				Snapshot:         nil,
				Snapshot_account: "",
				Snapshot_id:      "",
				Status:           "Online",
				Status_detail:    "",
				Status_timestamp: "2017-04-06T14:23:54Z",
				Storage_pool:     "/uscom-central-1/chi1-opc-c10r310-zfs-1-v1/storagepool/iscsi",
				Tags:             []string{},
				Uri:              "https://compute.uscom-central-1.oraclecloud.com/storage/volume/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools_storage",
				Writecache:       false,
			},
			CreateErr: nil,
			Update: response.StorageVolume{
				Account:           "/Compute-a432100/default",
				Bootable:          true,
				Description:       nil,
				Hypervisor:        nil,
				Imagelist:         "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Imagelist_entry:   1,
				Machineimage_name: "/Compute-a432100/sgiulitti@cloudbase.com/Ubuntu.16.04-LTS.amd64.20170307",
				Managed:           true,
				Name:              "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Platform:          "linux",
				Properties: []common.StoragePool{
					"/oracle/public/storage/default",
				},
				Quota:            nil,
				Readonly:         false,
				Shared:           false,
				Size:             10,
				Snapshot:         nil,
				Snapshot_account: "",
				Snapshot_id:      "",
				Status:           "Online",
				Status_detail:    "",
				Status_timestamp: "2017-04-06T14:23:54Z",
				Storage_pool:     "/uscom-central-1/chi1-opc-c10r310-zfs-1-v1/storagepool/iscsi",
				Tags:             []string{},
				Uri:              "https://compute.uscom-central-1.oraclecloud.com/storage/volume/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools_storage",
				Writecache:       false,
			},

			UpdateErr: nil,
		},
		FakeStorageAttachment: FakeStorageAttachment{
			All: response.AllStorageAttachments{
				Result: []response.StorageAttachment{
					{
						Account:             nil,
						Hypervisor:          nil,
						Index:               1,
						Instance_name:       "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837",
						Storage_volume_name: "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
						Name:                "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
						Readonly:            false,
						State:               "attached",
						Uri:                 "https://compute.uscom-central-1.oraclecloud.com/storage/attachment/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
					},
				},
			},
			AllErr: nil,
			StorageAttachment: response.StorageAttachment{
				Account:             nil,
				Hypervisor:          nil,
				Index:               1,
				Instance_name:       "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837",
				Storage_volume_name: "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Name:                "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
				Readonly:            false,
				State:               "attached",
				Uri:                 "https://compute.uscom-central-1.oraclecloud.com/storage/attachment/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
			},
			StorageAttachmentErr: nil,
			Create: response.StorageAttachment{
				Account:             nil,
				Hypervisor:          nil,
				Index:               1,
				Instance_name:       "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837",
				Storage_volume_name: "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools_storage",
				Name:                "/Compute-a432100/sgiulitti@cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
				Readonly:            false,
				State:               "attached",
				Uri:                 "https://compute.uscom-central-1.oraclecloud.com/storage/attachment/Compute-a432100/sgiulitti%40cloudbase.com/JujuTools/ebc4ce91-56bb-4120-ba78-13762597f837/1f90e657-f852-45ad-afbf-9a94f640a7ae",
			},
			CreateErr: nil,
			DeleteErr: nil,
		},
	}
)

Functions

This section is empty.

Types

type FakeAcl

type FakeAcl struct {
	Acls      response.AllAcls
	Acl       response.Acl
	AclErr    error
	Create    response.Acl
	CreateErr error
	DeleteErr error
}

FakeAcl implements the common.AclAPI interface

func (FakeAcl) AclDetails

func (f FakeAcl) AclDetails(string) (response.Acl, error)

func (FakeAcl) AllAcls

func (f FakeAcl) AllAcls([]api.Filter) (response.AllAcls, error)

func (FakeAcl) CreateAcl

func (f FakeAcl) CreateAcl(string, string, bool, []string) (response.Acl, error)

func (FakeAcl) DeleteAcl

func (f FakeAcl) DeleteAcl(string) error

type FakeApplication

type FakeApplication struct {
	All        response.AllSecApplications
	AllErr     error
	Default    response.AllSecApplications
	DefaultErr error
	Create     response.SecApplication
	CreateErr  error
}

FakeApplications type implements the common.ApplicationsAPI

func (FakeApplication) AllSecApplications

func (f FakeApplication) AllSecApplications([]api.Filter) (response.AllSecApplications, error)

func (FakeApplication) CreateSecApplication

func (FakeApplication) DefaultSecApplications

func (f FakeApplication) DefaultSecApplications([]api.Filter) (response.AllSecApplications, error)

type FakeAssociation

type FakeAssociation struct {
	All    response.AllSecAssociations
	AllErr error
}

func (FakeAssociation) AllSecAssociations

func (f FakeAssociation) AllSecAssociations([]api.Filter) (response.AllSecAssociations, error)

type FakeAuthenticater

type FakeAuthenticater struct {
	AuthenticateErr error
}

func (FakeAuthenticater) Authenticate

func (f FakeAuthenticater) Authenticate() error

type FakeComposer

type FakeComposer struct {
	Compose string
}

FakeComposer implements common.Composer interface

func (FakeComposer) ComposeName

func (f FakeComposer) ComposeName(name string) string

type FakeFirewallAPI

FakeFirewallAPI used to mock the internal Firewaller implementation This type implements the network.FirewallerAPI interface

type FakeImager

type FakeImager struct {
	All    response.AllImageLists
	AllErr error
}

func (FakeImager) AllImageLists

func (f FakeImager) AllImageLists([]api.Filter) (response.AllImageLists, error)

func (FakeImager) CreateImageList

func (f FakeImager) CreateImageList(def int, description string, name string) (resp response.ImageList, err error)

func (FakeImager) CreateImageListEntry

func (f FakeImager) CreateImageListEntry(
	name string,
	attributes map[string]interface{},
	version int,
	machineImages []string,
) (resp response.ImageListEntryAdd, err error)

func (FakeImager) DeleteImageList

func (f FakeImager) DeleteImageList(name string) (err error)

type FakeInstance

type FakeInstance struct {
	Create    response.LaunchPlan
	CreateErr error
	All       response.AllInstances
	AllErr    error
	DeleteErr error
}

func (FakeInstance) AllInstances

func (f FakeInstance) AllInstances([]api.Filter) (response.AllInstances, error)

func (FakeInstance) CreateInstance

func (f FakeInstance) CreateInstance(api.InstanceParams) (response.LaunchPlan, error)

func (FakeInstance) DeleteInstance

func (f FakeInstance) DeleteInstance(string) error

type FakeInstancer

type FakeInstancer struct {
	Instance    response.Instance
	InstanceErr error
}

func (FakeInstancer) InstanceDetails

func (f FakeInstancer) InstanceDetails(string) (response.Instance, error)

type FakeIpAddressprefixSet

type FakeIpAddressprefixSet struct {
	Create    response.IpAddressPrefixSet
	CreateErr error
	All       response.AllIpAddressPrefixSets
	AllErr    error
}

FakeIpAddressPrefixSet type implements the common.IpAddressPrefixSetAPI interface

func (FakeIpAddressprefixSet) AllIpAddressPrefixSets

func (f FakeIpAddressprefixSet) AllIpAddressPrefixSets(
	[]api.Filter,
) (response.AllIpAddressPrefixSets, error)

func (FakeIpAddressprefixSet) CreateIpAddressPrefixSet

type FakeIpAssociation

type FakeIpAssociation struct {
	Create    response.IpAssociation
	CreateErr error
	DeleteErr error
	All       response.AllIpAssociations
	AllErr    error
}

func (FakeIpAssociation) AllIpAssociations

func (f FakeIpAssociation) AllIpAssociations([]api.Filter) (response.AllIpAssociations, error)

func (FakeIpAssociation) CreateIpAssociation

func (FakeIpAssociation) DeleteIpAssociation

func (f FakeIpAssociation) DeleteIpAssociation(string) error

type FakeIpNetworkExchanger

type FakeIpNetworkExchanger struct {
	All    response.AllIpNetworkExchanges
	AllErr error
}

func (FakeIpNetworkExchanger) AllIpNetworkExchanges

func (f FakeIpNetworkExchanger) AllIpNetworkExchanges([]api.Filter) (response.AllIpNetworkExchanges, error)

type FakeIpNetworker

type FakeIpNetworker struct {
	All    response.AllIpNetworks
	AllErr error
}

func (FakeIpNetworker) AllIpNetworks

func (f FakeIpNetworker) AllIpNetworks([]api.Filter) (response.AllIpNetworks, error)

type FakeIpReservation

type FakeIpReservation struct {
	All       response.AllIpReservations
	AllErr    error
	Update    response.IpReservation
	UpdateErr error
	Create    response.IpReservation
	CreateErr error
	DeleteErr error
}

func (FakeIpReservation) AllIpReservations

func (f FakeIpReservation) AllIpReservations([]api.Filter) (response.AllIpReservations, error)

func (FakeIpReservation) CreateIpReservation

func (f FakeIpReservation) CreateIpReservation(string, common.IPPool, bool, []string) (response.IpReservation, error)

func (FakeIpReservation) DeleteIpReservation

func (f FakeIpReservation) DeleteIpReservation(string) error

func (FakeIpReservation) UpdateIpReservation

type FakeRules

type FakeRules struct {
	All       response.AllSecRules
	AllErr    error
	Create    response.SecRule
	CreateErr error
	DeleteErr error
}

FakeRules implement common.RuleAPI interface

func (FakeRules) AllSecRules

func (f FakeRules) AllSecRules([]api.Filter) (response.AllSecRules, error)

func (FakeRules) CreateSecRule

func (f FakeRules) CreateSecRule(api.SecRuleParams) (response.SecRule, error)

func (FakeRules) DeleteSecRule

func (f FakeRules) DeleteSecRule(name string) error

type FakeSecIp

type FakeSecIp struct {
	All           response.AllSecIpLists
	AllErr        error
	Create        response.SecIpList
	CreateErr     error
	AllDefault    response.AllSecIpLists
	AllDefaultErr error
}

FakeSecIp implements common.SecIpAPI interface

func (FakeSecIp) AllDefaultSecIpLists

func (f FakeSecIp) AllDefaultSecIpLists([]api.Filter) (response.AllSecIpLists, error)

func (FakeSecIp) AllSecIpLists

func (f FakeSecIp) AllSecIpLists([]api.Filter) (response.AllSecIpLists, error)

func (FakeSecIp) CreateSecIpList

func (f FakeSecIp) CreateSecIpList(string, string, []string) (response.SecIpList, error)

type FakeSecList

type FakeSecList struct {
	SecList    response.SecList
	SecListErr error
	DeleteErr  error
	Create     response.SecList
	CreateErr  error
}

FakeSecList implement the common.SecListAPI interface

func (FakeSecList) DeleteSecList

func (f FakeSecList) DeleteSecList(string) error

func (FakeSecList) SecListDetails

func (f FakeSecList) SecListDetails(string) (response.SecList, error)

type FakeSecRules

type FakeSecRules struct {
	All       response.AllSecurityRules
	AllErr    error
	DeleteErr error
	Create    response.SecurityRule
	CreateErr error
}

type FakeSecRules imeplements the common.SecRulesAPI interface

func (FakeSecRules) AllSecurityRules

func (f FakeSecRules) AllSecurityRules([]api.Filter) (response.AllSecurityRules, error)

func (FakeSecRules) CreateSecurityRule

func (f FakeSecRules) CreateSecurityRule(
	api.SecurityRuleParams,
) (response.SecurityRule, error)

func (FakeSecRules) DeleteSecurityRule

func (f FakeSecRules) DeleteSecurityRule(string) error

type FakeShaper

type FakeShaper struct {
	All    response.AllShapes
	AllErr error
}

func (FakeShaper) AllShapes

func (f FakeShaper) AllShapes([]api.Filter) (response.AllShapes, error)

type FakeStorageAPI

type FakeStorageAPI struct {
	FakeComposer
	FakeStorageVolume
	FakeStorageAttachment
}

FakeStorageAPi used to mock the internal StorageAPI imeplementation This type implements the StorageAPI interface

type FakeStorageAttachment

type FakeStorageAttachment struct {
	Create               response.StorageAttachment
	CreateErr            error
	DeleteErr            error
	All                  response.AllStorageAttachments
	AllErr               error
	StorageAttachment    response.StorageAttachment
	StorageAttachmentErr error
}

FakeStorageAttachment implements the common.FakeStorageAttachmentAPI

func (FakeStorageAttachment) AllStorageAttachments

func (f FakeStorageAttachment) AllStorageAttachments([]api.Filter) (response.AllStorageAttachments, error)

func (FakeStorageAttachment) CreateStorageAttachment

func (FakeStorageAttachment) DeleteStorageAttachment

func (f FakeStorageAttachment) DeleteStorageAttachment(string) error

func (FakeStorageAttachment) StorageAttachmentDetails

func (f FakeStorageAttachment) StorageAttachmentDetails(string) (response.StorageAttachment, error)

type FakeStorageVolume

type FakeStorageVolume struct {
	testing.Stub

	StorageVolume    response.StorageVolume
	StorageVolumeErr error
	Create           response.StorageVolume
	CreateErr        error
	All              response.AllStorageVolumes
	AllErr           error
	DeleteErr        error
	Update           response.StorageVolume
	UpdateErr        error
}

FakeStorageVolume implements the common.StorageVolumeAPI

func (*FakeStorageVolume) AllStorageVolumes

func (f *FakeStorageVolume) AllStorageVolumes(filter []api.Filter) (response.AllStorageVolumes, error)

func (*FakeStorageVolume) CreateStorageVolume

func (f *FakeStorageVolume) CreateStorageVolume(params api.StorageVolumeParams) (response.StorageVolume, error)

func (*FakeStorageVolume) DeleteStorageVolume

func (f *FakeStorageVolume) DeleteStorageVolume(name string) error

func (*FakeStorageVolume) StorageVolumeDetails

func (f *FakeStorageVolume) StorageVolumeDetails(name string) (response.StorageVolume, error)

func (*FakeStorageVolume) UpdateStorageVolume

func (f *FakeStorageVolume) UpdateStorageVolume(params api.StorageVolumeParams, name string) (response.StorageVolume, error)

type FakeVnicSet

type FakeVnicSet struct {
	Create     response.VnicSet
	CreateErr  error
	VnicSet    response.VnicSet
	VnicSetErr error
	DeleteErr  error
}

func (FakeVnicSet) CreateVnicSet

func (f FakeVnicSet) CreateVnicSet(api.VnicSetParams) (response.VnicSet, error)

func (FakeVnicSet) DeleteVnicSet

func (f FakeVnicSet) DeleteVnicSet(string) error

func (FakeVnicSet) VnicSetDetails

func (f FakeVnicSet) VnicSetDetails(string) (response.VnicSet, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL