Commit Graph

32 Commits

Author SHA1 Message Date
f7f91df622 CSharp Refactor - Instance Config Endpoint (#2347)
* CSharp Refactor - Instance Config Endpoint

* Finshing config update.

* Formatting.

* Formatting.

* formatting.

* Fixing encoding.

* Fixing config references.

* Fixing refs.

* Trying location.

* Trying ref to location.

* Passing nsg.

* Passing nsg.

* Setting nsg to not null.

* Fixing ok reference.

* Adding Instance Config Response.

* Setting required attribute.

* Adding route specifier.

* Formatting.

* Fixing route.

* Fixing optionals.

* Trying to set default

* Trying again.

* Setting require admins

* Removing optioanl.

* Testing with instancename.

* Updating instanceconfig model.

* Updating instance config response.

* Formatting.

* Removing AllowPoolManagement.

* Readding.

* Removing arg.

* Replacing with RequireAdminPrivs.

* Fix orm test.

* Setting requireadminprivs to true.

* Requiring admin privs.

* Fix formatting.

* fix test.

* Fixing.

* Changing error message.

* Changing.

* Reordering test args.

* Flipping.

* Fixing args.

* Fixing again.

* Removing false.

* Removing from constructor.

* Setting.

* Setting string to optional.

* Formatting.

* Adding default value.

* PUshing changes to OrmModelsTest

* Updating test to not pass null.

* George's suggestions.

* Removing entityconverter changes.

* Fixing import.
2022-09-13 08:55:40 -07:00
2a2c07ed35 Extend use of validated string types (#2357)
In the Python code there were more validated string types that haven't been properly ported for use in the C# code (such as Region). Add that type back in and improve some others:

- Use `Region` type to represent regions (implicitly convertible to/from the `AzureLocation` SDK type)
- Improve validation of `Container` type to match Azure specs and use it in more places
- Restore/fix validation of `PoolName` type which was previously removed (#2080) due to being too strict: now allows 1-64 ASCII alphanumeric/hyphen/dash
  - We want to restrict pool names so that we can use them as disambiguating prefixes for scaleset names (see #2189). Note that underscore is not actually permitted in scaleset names so we will probably end up mapping it to hyphen.

Note that once C#7 lands we will be able to simplify the usage of `ValidatedString` a lot (using static abstract methods).

----

Open questions:

For deserializing from "known-good" places such as table storage or from Azure SDK APIs, should we have an `T.UnsafeAssumeValid(string input)` method which does no validation, to protect us from breakage?
2022-09-12 10:06:51 +12:00
d1bfaefd0d Implement scaleset function for C# (#2191)
Implements #2194
2022-08-17 15:00:57 +12:00
c798659d0e migrate tasks (#2233)
* migrate task

* cleanup

* NotSupported instead of NotImplemented

* address pr comments
fix function name

* fix default value

* rename base state

* add caching

* return the task when deleting

* build fix

* format
2022-08-10 18:56:07 -07:00
6d07095eea migrate proxy (#2206)
* migrate proxy function

* - added private ip address query
- updated Azure.ResourceManager.Storage to non beta release

* remove comment

* extracting nework interface query

* format

* Update src/ApiService/ApiService/Functions/Proxy.cs

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>

* fix function name

* Fix merge conflict

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>
2022-08-04 20:09:09 +00:00
36d36cdfaa saving secrets in keyvault (#2200) 2022-07-28 12:12:47 -07:00
25242f1ab9 Migrating notifications (#2188)
* Migrating notification

* add dotnet enpoint setting in the config

* format

* fix unit test

* format

* build fix

* fix notifictions function definition

* fix deserilization of requests
refactor secretdata
finish transfering Notifiction objects

* format
2022-07-28 09:17:14 -07:00
7f90c13724 Laying groundwork for TimerRepro implementation (#2168)
* Add some pre-reqs for TimerRepro

* Format and add some API to creds

* PR comment
2022-07-15 18:33:25 +00:00
aa2e76e7e9 Fix execution of TimerProxy (#2133)
* Fix execution of timerProxy
- fixed behavior of Container.SaveBlob (file was not being overwritten)
- added support for default value in the entity converter
- fix scaleset size data type
- added initialization of Subnet
- renamed TestHook Info to _Info to prevent clashing of name function mame
- added target framework to ApiServiceProject to help local debugging

* fix unit tests

* fix unit tests

* remove unused property

* fix typo

* removing partial class TimerProxy
2022-07-07 09:25:51 -07:00
ea60410df9 Enable C# functions in code & fill out missing functionality (#2084)
C# HTTP functions won’t take effect by default so it is safe to enable them in code. Also implement required authentication code.
2022-06-30 01:33:12 +00:00
2a6a0d9996 Raise AnalysisLevel to 6.0-Recommended, fix warnings (#2086)
Raise the .NET Code Analysis Level to `6.0-Minimum` and then `6.0-Recommended`.
2022-06-28 21:27:33 +00:00
4eec0bfc45 Implement the node C# function (#2072)
1. Ports the `node` function from Python to C#.
2. Adds a missing authentication check.
3. Add validated string type `PoolName` for consistency with Python version.
2022-06-23 13:44:14 +12:00
6d15a46897 proxy forward test hooks (#1924)
fixing some bugs

Co-authored-by: stas <statis@microsoft.com>
2022-05-11 13:05:29 -07:00
28f0cfbf9f Notification operations test hooks (#1897)
Co-authored-by: stas <statis@microsoft.com>
2022-05-05 08:21:49 -07:00
0859b04746 Node Ops test hooks (#1895)
Co-authored-by: stas <statis@microsoft.com>
2022-05-04 12:33:46 -07:00
3f23bdf336 More testing (#1884)
* adding more tests

* more tests

Co-authored-by: stas <statis@microsoft.com>
2022-05-03 10:14:56 -07:00
5ccd519065 timer workers (part 2) (#1876)
* timer workers (part 2)

* addressing pr comment

Co-authored-by: stas <statis@microsoft.com>
2022-05-02 17:32:34 -07:00
732400be1d Timer workers (part 1) (#1863)
Co-authored-by: stas <statis@microsoft.com>
2022-04-30 09:04:45 -07:00
7403c276d3 log analytics (#1851)
Co-authored-by: stas <statis@microsoft.com>
2022-04-27 15:49:52 -07:00
0b1c7aea9c C# Refactor For Webhook Queue (#1818)
* Working on Webhook Queue Changes.

* Initial Push w/ Webhook Work.

* Initial Push. Working on Testing.

* Moving InstanceId

* Removing primitives.

* Formatting.

* Fixing formatting?

* Moving GetInstanceId to containers.

* Moving comments for formatting.

* Removing unused dependency.

* Comments.

* Add WebhookEventGrid test.

* Fixing how tests work.

* Working to resolve conflicts.

* Resolving conflicts.

* Fixing chagnes.

* Tested code.

* Formatting.

* MoreFormatting.

* More formatting.

* Fixing syntax.

* Fixing syntax.

* Removing test and webhookmessagelogoperation class.

* Using config.

* Fixing ProxyOperations.
2022-04-26 13:07:10 -07:00
5f8e381fcb formatting (#1847) 2022-04-26 10:22:35 -07:00
8003b1d3e0 Migrate timer_task (#1846) 2022-04-26 09:30:14 -07:00
c71cdb6d72 timer_retention (#1845)
Co-authored-by: stas <statis@microsoft.com>
2022-04-26 08:36:06 -07:00
c6992698e5 Job model (#1841)
Co-authored-by: stas <statis@microsoft.com>
2022-04-25 15:40:28 -07:00
3a93de4801 migrate timer_proxy part 2 (#1836) 2022-04-25 10:14:15 -07:00
e86854cf2a - Move some persistent resources into SingletonResources class (#1835)
- Rename ResultOk to ResultVoid

Move environment variables to singleton

Co-authored-by: stas <statis@microsoft.com>
2022-04-22 17:40:11 -07:00
d283e989f6 Add implementation to get allowed tenants (#1833)
Co-authored-by: stas <statis@microsoft.com>
2022-04-22 14:45:33 -07:00
ddc415c91e more tests (#1832)
Co-authored-by: stas <statis@microsoft.com>
2022-04-22 13:00:57 -07:00
812a6d7517 [WIP] migrate timer_proxy (#1820) 2022-04-22 15:43:44 +00:00
16d7694852 Implement new_files (#1794)
* Checkpoint

* Checkpoint

* More merge resolving

* Code complete

* Tested that it works

* Keep the queue name different for now

* Query was wrong, should be and

* Style

* Fix compile issue

* Change report to use string instead of SHA, fixes tests as well

* PR comments

* Comments and formatting
2022-04-20 18:36:50 +00:00
e32f42cc1b Limited support for polymorphic deserialization (#1814) 2022-04-19 18:36:50 -07:00
5827d3b90e Add property based testing (#1813)
* Add property based testing

* comment out failing test (service code will be fixed later)

* add some json serialization tests

Co-authored-by: stas <statis@microsoft.com>
2022-04-19 10:42:14 -07:00