initial add
deleting bin/cert
adding license info

tweaking packages to match go standard conventions

updating to match tweaked package names

Change-Id: I78b395a778c0ceb649e2aa4491c81fd3dc28d0c0
diff --git a/models/physical/chassis.go b/models/physical/chassis.go
new file mode 100644
index 0000000..339a610
--- /dev/null
+++ b/models/physical/chassis.go
@@ -0,0 +1,29 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+import "net"
+
+/*
+Chassis is a model that takes up to 16 discreet OLT chassis as if it is a 16 slot OLT chassis
+*/
+type Chassis struct {
+	CLLI         string
+	VCoreAddress net.TCPAddr
+	Dataswitch   DataSwitch
+	Linecards    []OLT
+}
diff --git a/models/physical/dataswitch.go b/models/physical/dataswitch.go
new file mode 100644
index 0000000..9146e7f
--- /dev/null
+++ b/models/physical/dataswitch.go
@@ -0,0 +1,30 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+import "net"
+
+type DataSwitch struct {
+	Ports        [32]EthPort
+	Driver       string
+	Ipv4Loopback net.TCPAddr
+	Ipv4NodeSid  int
+	isEdgeRouter bool
+	Name         string
+	OfId         string
+	RouterMac    string
+}
diff --git a/models/physical/edgecore.go b/models/physical/edgecore.go
new file mode 100644
index 0000000..196d44e
--- /dev/null
+++ b/models/physical/edgecore.go
@@ -0,0 +1,34 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+/*
+Edgecore Implements the Edgecore linecard as an OLT
+*/
+type Edgecore struct {
+	SimpleOLT
+}
+
+/*
+CreateEdgecore takes simple olt struct and generates Edgecore OLT
+*/
+func CreateEdgecore(olt *SimpleOLT) *Edgecore {
+	var newPorts [16]PONPort
+	edge := Edgecore{SimpleOLT: *olt}
+	edge.Ports = newPorts[:]
+	return &edge
+}
diff --git a/models/physical/ethdevice.go b/models/physical/ethdevice.go
new file mode 100644
index 0000000..979edb2
--- /dev/null
+++ b/models/physical/ethdevice.go
@@ -0,0 +1,27 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+/*
+EthDevice represents a device with an ethernet port
+*/
+type EthDevice interface {
+}
+
+type EthPort struct {
+	Connected *EthDevice
+}
diff --git a/models/physical/olt.go b/models/physical/olt.go
new file mode 100644
index 0000000..3c2094d
--- /dev/null
+++ b/models/physical/olt.go
@@ -0,0 +1,74 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+import "net"
+
+/*
+Represents an arbitrary OLT linecard
+*/
+type OLT interface {
+	GetCLLI() string
+	GetHostname() string
+	GetAddress() net.TCPAddr
+	GetNumber() int
+	GetPorts() []PONPort
+	GetParent() *Chassis
+	GetDataSwitchPort() int
+}
+
+/*
+A basic representation of an OLT which fulfills the above interface,
+and can be used in other OLT implementations
+*/
+type SimpleOLT struct {
+	CLLI           string
+	Hostname       string
+	Address        net.TCPAddr
+	Number         int
+	Ports          []PONPort
+	Parent         *Chassis `json:"-"`
+	DataSwitchPort int
+}
+
+func (s *SimpleOLT) GetCLLI() string {
+	return s.CLLI
+}
+
+func (s *SimpleOLT) GetHostname() string {
+	return s.Hostname
+}
+
+func (s *SimpleOLT) GetAddress() net.TCPAddr {
+	return s.Address
+}
+
+func (s *SimpleOLT) GetNumber() int {
+	return s.Number
+}
+
+func (s *SimpleOLT) GetPorts() []PONPort {
+	return s.Ports
+}
+
+func (s *SimpleOLT) GetParent() *Chassis {
+	return s.Parent
+}
+
+func (s *SimpleOLT) GetDataSwitchPort() int {
+	return s.DataSwitchPort
+}
diff --git a/models/physical/ont.go b/models/physical/ont.go
new file mode 100644
index 0000000..4bd47ac
--- /dev/null
+++ b/models/physical/ont.go
@@ -0,0 +1,27 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+/*
+Ont represents a single ont/onu connect to a splitter on a Port
+*/
+type Ont struct {
+	Number int
+	Svlan  int
+	Cvlan  int
+	Parent *PONPort `json:"-"`
+}
diff --git a/models/physical/ponport.go b/models/physical/ponport.go
new file mode 100644
index 0000000..99c282a
--- /dev/null
+++ b/models/physical/ponport.go
@@ -0,0 +1,27 @@
+/*
+   Copyright 2017 the original author or authors.
+
+   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 physical
+
+/*
+Port represents a single PON port on the OLT chassis
+*/
+type PONPort struct {
+	Number   int
+	DeviceID string
+	Onts     [64]Ont
+	Parent   *Edgecore `json:"-"`
+}