Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions home0/inserts/bin/099_home0_start_tr064.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
sed -i 's/listen(port/listen(port, "0.0.0.0"/g' /usr/local/lib/node_modules/mockserver/bin/mockserver.js

# Accept connections to the TR-064 mock server
iptables -I INPUT 1 -p tcp --dport 5438 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 37215 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 49000 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 49001 -j ACCEPT

# start TR-064 moc server
cd /opt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><cms:GetSupportedDataModels xmlns:cms="urn:schemas-upnp-org:dm:cms"></cms:GetSupportedDataModels></s:Body></s:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetSupportedParameters xmlns:u="urn:schemas-upnp-org:service:ConfigurationManagement:2" xmlns:cms="urn:schemas-upnp-org:dm:cms"><Parameters><StartingNode><cms:StructurePathList><StructurePath>/BBF/DSL/Line/#/</StructurePath><StructurePath>/BBF/DSL/Channel/#/</StructurePath></cms:StructurePathList></StartingNode><SearchDepth>0</SearchDepth></Parameters></u:GetSupportedParameters></s:Body></s:Envelope>
1 change: 1 addition & 0 deletions home0/inserts/tr064/mockserver/SOAP_GetValues.request
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><cms:GetValues xmlns:cms="urn:schemas-upnp-org:service:ConfigurationManagement:2"><Parameters><cms:ContentPathList><ContentPath>/BBF/DSL/Line/#/</ContentPath><ContentPath>/BBF/DSL/Channel/#/</ContentPath></cms:ContentPathList></Parameters></cms:GetValues></s:Body></s:Envelope>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ HTTP/1.1 200 OK
SERVER: [MOCKED_SERVER]
CACHE-CONTROL: max-age=1800
CONTENT-TYPE: text/xml; charset=utf-8
CONTENT-LENGTH: [MOCKED_length]
CONTENT-LENGTH: [CALC_LEN]

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:[MOCKED_xmlns]>
<SOAP-ENV:Body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HTTP/1.1 500 Internal Server Error
SERVER: [MOCKED_SERVER]
CONNECTION: close
CONTENT-LENGTH: [MOCKED_length]
CONTENT-LENGTH: [CALC_LEN]
CONTENT-TYPE: text/xml; charset="utf-8"

<?xml version="1.0"?>
Expand Down
35 changes: 35 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetSupportedDataModels.200
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
HTTP/1.1 200 OK
SERVER: [MOCKED_SERVER]
CACHE-CONTROL: max-age=1800
CONTENT-TYPE: text/xml; charset=utf-8
CONTENT-LENGTH: [CALC_LEN]
TRANSFER-ENCODING: [MOCKED_ENCODING]

<?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetSupportedDataModelsResponse xmlns:u="urn:schemas-upnp-org:service:ConfigurationManagement:2">
<cms:SupportedDataModels xmlns:cms="urn:schemas-upnp-org:dm:cms">
<SubTree>
<URI>urn:UPnP:Parent Device:1:ConfigurationManagement:2</URI>
<Location>/UPnP/DM/Configuration/</Location>
<Description>UPnP Manageable Device common objects for CMS</Description>
</SubTree>
<SubTree>
<URI>urn:broadband-forum-org:tr-181-2-0</URI>
<Location>/BBF/</Location>
<URL>https://cwmp-data-models.broadband-forum.org/tr-181-2-0-0.xml</URL>
<Description>TR-181</Description>
</SubTree>
<SubTree>
<URI>urn:broadband-forum-org:tr-135-1-0-0</URI>
<Location>/BBF/STBService/</Location>
<URL>http://www.example.com/upnp/stb/bbf-stb-1-0.xml</URL>
<Description>TR-135 STBService Object</Description>
</SubTree>
</cms:SupportedDataModels>
</u:GetSupportedDataModelsResponse>
</s:Body>
</s:Envelope>
22 changes: 22 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetSupportedDataModels.500
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
HTTP/1.1 500 Internal Server Error
SERVER: [MOCKED_SERVER]
CONNECTION: close
CONTENT-LENGTH: [CALC_LEN]
CONTENT-TYPE: text/xml; charset="utf-8"

<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
77 changes: 77 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetSupportedParameters.200
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
HTTP/1.1 200 OK
SERVER: [MOCKED_SERVER]
CACHE-CONTROL: max-age=1800
CONTENT-TYPE: text/xml; charset=utf-8
CONTENT-LENGTH: [CALC_LEN]
TRANSFER-ENCODING: [MOCKED_ENCODING]

<?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetSupportedParametersResponse xmlns:u="urn:schemas-upnp-org:service:ConfigurationManagement:2">
<cms:Result xmlns:cms="urn:schemas-upnp-org:dm:cms">
<cms:StructurePathList>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRGds
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRGus
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRpsds
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRpsus
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRMTds
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/SNRMTus
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/LATNds
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/TestParams/LATNus
</StructurePath>
<StructurePath>
/BBF/DSL/Channel/0/Stats/Total/XTURFECErrors
</StructurePath>
<StructurePath>
/BBF/DSL/Channel/0/Stats/Total/XTURCRCErrors
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/LinkStatus
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/StandardUsed
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/CurrentProfile
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/DownstreamMaxBitRate
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/UpstreamMaxBitRate
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/DownstreamNoiseMargin
</StructurePath>
<StructurePath>
/BBF/DSL/Line/0/UpstreamNoiseMargin
</StructurePath>
<StructurePath>
/BBF/DSL/Channel/0/DownstreamCurrRate
</StructurePath>
<StructurePath>
/BBF/DSL/Channel/0/UpstreamCurrRate
</StructurePath>
</cms:StructurePathList>
</cms:Result>
</u:GetSupportedParametersResponse>
</s:Body>
</s:Envelope>
22 changes: 22 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetSupportedParameters.500
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
HTTP/1.1 500 Internal Server Error
SERVER: [MOCKED_SERVER]
CONNECTION: close
CONTENT-LENGTH: [CALC_LEN]
CONTENT-TYPE: text/xml; charset="utf-8"

<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
172 changes: 172 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetValues.200
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
HTTP/1.1 200 OK
SERVER: [MOCKED_SERVER]
CACHE-CONTROL: max-age=1800
CONTENT-TYPE: text/xml; charset=utf-8
CONTENT-LENGTH: [CALC_LEN]
TRANSFER-ENCODING: [MOCKED_ENCODING]

<?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetValuesResponse
xmlns:u="urn:schemas-upnp-org:service:ConfigurationManagement:2">
<cms:ParameterValueList
xmlns:cms="urn:schemas-upnp-org:dm:cms">
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRGds
</ParameterPath>
<Value>
[MOCKED_SNRGds]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRGus
</ParameterPath>
<Value>
[MOCKED_SNRGus]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRpsds
</ParameterPath>
<Value>
[MOCKED_SNRpsds]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRpsus
</ParameterPath>
<Value>
[MOCKED_SNRpsus]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRMTds
</ParameterPath>
<Value>
[MOCKED_SNRMTds]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/SNRMTus
</ParameterPath>
<Value>
[MOCKED_SNRMTus]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/LATNds
</ParameterPath>
<Value>
[MOCKED_LATNds]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/TestParams/LATNus
</ParameterPath>
<Value>
[MOCKED_LATNus]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Channel/0/Stats.Total.XTURFECErrors
</ParameterPath>
<Value>
[MOCKED_FECErrors]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Channel/0/Stats.Total.XTURCRCErrors
</ParameterPath>
<Value>
[MOCKED_CRCErrors]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/LinkStatus
</ParameterPath>
<Value>
[MOCKED_LinkStatus]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/StandardUsed
</ParameterPath>
<Value>
[MOCKED_StandardUsed]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/CurrentProfile
</ParameterPath>
<Value>
[MOCKED_CurrentProfile]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/DownstreamMaxBitRate
</ParameterPath>
<Value>
[MOCKED_DownstreamMaxBitRate]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/UpstreamMaxBitRate
</ParameterPath>
<Value>
[MOCKED_UpstreamMaxBitRate]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/DownstreamNoiseMargin
</ParameterPath>
<Value>
[MOCKED_DownstreamNoiseMargin]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Line/0/UpstreamNoiseMargin
</ParameterPath>
<Value>
[MOCKED_UpstreamNoiseMargin]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Channel/0/DownstreamCurrRate
</ParameterPath>
<Value>
[MOCKED_DownstreamCurrRate]
</Value>
</Parameter>
<Parameter>
<ParameterPath>
/BBF/DSL/Channel/0/UpstreamCurrRate
</ParameterPath>
<Value>
[MOCKED_UpstreamCurrRate]
</Value>
</Parameter>
</cms:ParameterValueList>
</u:GetValuesResponse>
</s:Body>
</s:Envelope>
22 changes: 22 additions & 0 deletions home0/inserts/tr064/mockserver/TR181_GetValues.500
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
HTTP/1.1 500 Internal Server Error
SERVER: [MOCKED_SERVER]
CONNECTION: close
CONTENT-LENGTH: [CALC_LEN]
CONTENT-TYPE: text/xml; charset="utf-8"

<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Loading